-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (43 loc) · 1.17 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
version: "3.7"
services:
traefik:
image: traefik:v2.3
ports:
- "80:80"
- "443:443"
- "3308:3306"
- "8080:8080"
- "9000:9000"
- "6379:6379"
deploy:
replicas: ${TRAEFIK_REPLICAS:-1}
placement:
constraints:
- node.role == manager
- node.hostname == essentials
preferences:
- spread: node.id
labels:
- traefik.enable=true
- traefik.http.routers.traefikapi.rule=Host(`traefik.local`)
- traefik.http.routers.traefikapi.entrypoints=web-secure
- traefik.http.routers.traefikapi.service=api@internal
- traefik.http.routers.traefikapi.tls=true
# - traefik.http.services.traefikapi-service.loadbalancer.server.port=8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/etc/traefik/traefik.toml
- ./conf.d:/etc/traefik/conf.d
- ./certs:/etc/certs:ro
restart: unless-stopped
mkcert:
image: vishnunair/docker-mkcert
environment:
- domain=*.local
volumes:
- ./certs:/root/.local/share/mkcert
networks:
default:
driver: "bridge"
attachable: true
name: "traefik"