-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 1.38 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
version: "3"
networks:
traefik-public:
external: true
# configs:
# traefik.toml:
# file: ./traefik.toml
services:
reverse-proxy:
# The official v2.0 Traefik docker image
image: traefik:v2.0
networks:
- traefik-public
# Enables the web UI and tells Traefik to listen to docker
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
# - "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./acme.json:/acme.json
deploy:
placement:
constraints:
- node.role==manager
restart_policy:
max_attempts: 3
condition: on-failure
# dynamic configuration
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entrypoints=web"
- "traefik.http.services.api.loadbalancer.server.port=8080"
- "traefik.http.routers.api.rule=Host(`traefik.local`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
# - "traefik.http.routers.api.entrypoints=web-secured"
# - "traefik.http.routers.api.tls"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=admin:$$apr1$$G.PxJEL6$$mZDPE.wWHP2e3E6fnfvuD."