This commit is contained in:
RZ
2026-06-28 23:29:25 +00:00
commit e2f27d11fc
19 changed files with 824 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
services:
database:
image: timescale/timescaledb:latest-pg16
restart: unless-stopped
environment:
POSTGRES_DB: traccar
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
TIMESCALEDB_TELEMETRY: "off"
volumes:
- ./data/db:/var/lib/postgresql/data
networks:
- default
traccar:
image: traccar/traccar:latest
restart: unless-stopped
depends_on:
- database
environment:
CONFIG_USE_ENVIRONMENT_VARIABLES: "true"
DATABASE_DRIVER: org.postgresql.Driver
DATABASE_URL: jdbc:postgresql://database:5432/traccar
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
healthcheck:
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:8082/api/health" ]
interval: 2m
timeout: 5s
start_period: 1h
retries: 3
# ports:
# - "8082:8082"
# - "5000-5500:5000-5500"
volumes:
- ./data/logs:/opt/traccar/logs
- ./data/config:/opt/traccar/conf
networks:
- default
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.traccar.rule=Host(`traccar.gandalf.dfas4.de`)"
- "traefik.http.routers.traccar.entrypoints=websecure"
- "traefik.http.routers.traccar.tls=true"
- "traefik.http.routers.traccar.tls.certresolver=myresolver"
- "traefik.http.services.traccar.loadbalancer.server.port=8082"
- "traefik.http.routers.traccar.tls.domains[0].main=gandalf.dfas4.de"
- "traefik.http.routers.traccar.tls.domains[0].sans=*.gandalf.dfas4.de"
autoheal:
image: willfarrell/autoheal:latest
restart: unless-stopped
networks:
- default
environment:
AUTOHEAL_CONTAINER_LABEL: all
AUTOHEAL_INTERVAL: 60
AUTOHEAL_START_PERIOD: 3600
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
bridge:
restart: unless-stopped
depends_on:
- traccar
build: https://github.com/jannisko/findmy-traccar-bridge.git
volumes:
- ./data/bridge:/bridge/data
- ./data/airtags:/bridge/plists
environment:
BRIDGE_TRACCAR_SERVER: "http://traccar:5055"
networks:
- default
networks:
proxy:
name: proxy