-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 2.49 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
70
71
72
73
74
75
76
version: "3.3"
services:
traefik:
image: "traefik:v2.4"
container_name: "traefik"
command:
# - "--log.level=DEBUG"
- "--global.sendanonymoususage=false"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.watch=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/dynamic.yml"
- "--providers.file.watch=true"
- "--entrypoints.http.address=:80"
- "--entrypoints.https=true"
- "--entrypoints.https.address=:443"
- "--api"
- "--metrics"
- "--metrics.prometheus"
- "--providers.docker.network=traefik-public"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./docker/traefik/certs:/certs
- ./docker/traefik/dynamic.yml:/dynamic.yml
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.traefik.rule=Host(`traefik.docker.localhost`)"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.tls=true"
#- "traefik.http.routers.traefik.tls.domains[0].main=traefik.docker"
#- "traefik.http.routers.traefik.tls.domains[0].sans=traefik.docker"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
whoami:
image: "containous/whoami"
container_name: "simple-whoami"
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
- "traefik.http.routers.whoami.entrypoints=http"
- "traefik.http.routers.whoami-secure.entrypoints=https"
- "traefik.http.routers.whoami-secure.rule=Host(`whoami.docker.localhost`)"
- "traefik.http.routers.whoami-secure.tls=true"
portainer:
container_name: "portainer"
image: portainer/portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.docker.localhost`)"
- "traefik.http.routers.portainer.entrypoints=http"
- "traefik.http.routers.portainer-secure.rule=Host(`portainer.docker.localhost`)"
- "traefik.http.routers.portainer-secure.entrypoints=https"
- "traefik.http.routers.portainer-secure.tls=true"
volumes:
portainer_data:
networks:
traefik-public:
external: true