-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
69 lines (68 loc) · 2.42 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3"
services:
db:
image: mysql:8.0.20
container_name: db
command: --default-authentication-plugin=mysql_native_password
restart: always
env_file: .env
volumes:
- /etc/localtime:/etc/localtime:ro
- db-datavolume:/var/lib/mysql
- ./mysql:/etc/mysql/conf.d
- ${MYSQL_BACKUP_LOCATION}:/opt/mysql/backup
ports:
- "3306:3306"
labels:
- traefik.enable=false
traccar:
image: ${TRACCAR_IMAGE}
container_name: traccar
depends_on:
- db
restart: always
volumes:
- ./traccar/conf/traccar.xml:/opt/traccar/conf/traccar.xml:ro
- /var/log/traccar:/opt/traccar/logs:rw
ports:
- "5000-5150:5000-5150"
- "8082:8082"
labels:
- traefik.http.routers.traccar.rule=Host(`web.${DOMAIN}`)
- traefik.http.services.traccar_web.loadbalancer.server.port=8082
rev_proxy:
image: traefik:v2.2
container_name: rev_proxy
restart: always
env_file: .env
ports:
- "80:80"
- "443:443"
- "8080:8080"
labels:
- traefik.http.routers.api.rule=Host(`proxy.${DOMAIN}`)
- traefik.http.routers.api.service=api@internal
- traefik.http.routers.api.middlewares=traefik-forward-auth
volumes:
- ./traefik/traefik.toml:/traefik.toml
- ./traefik/acme.json:/acme.json
- /var/log/traefik:/logs
- /var/run/docker.sock:/var/run/docker.sock
traefik-forward-auth:
image: thomseddon/traefik-forward-auth:2
container_name: traefik_forward_auth
restart: always
environment:
- DEFAULT_PROVIDER=${DEFAULT_PROVIDER}
- PROVIDERS_OIDC_ISSUER_URL=${PROVIDERS_OIDC_ISSUER_URL}
- PROVIDERS_OIDC_CLIENT_ID=${PROVIDERS_OIDC_CLIENT_ID}
- PROVIDERS_OIDC_CLIENT_SECRET=${PROVIDERS_OIDC_CLIENT_SECRET}
- SECRET=${SECRET}
- INSECURE_COOKIE=true
- LOG_LEVEL=error
labels:
- "traefik.http.middlewares.traefik-forward-auth.forwardauth.address=http://traefik-forward-auth:4181"
- "traefik.http.middlewares.traefik-forward-auth.forwardauth.authResponseHeaders=X-Forwarded-User"
- "traefik.http.services.traefik-forward-auth.loadbalancer.server.port=4181"
volumes:
db-datavolume: