-
Notifications
You must be signed in to change notification settings - Fork 0
/
traefik.docker-compose.yml
35 lines (31 loc) · 1.19 KB
/
traefik.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
version: "3"
services:
portainer:
container_name: portainer
image: portainer/portainer-ce:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/portainer/data:/data
networks:
- public
ports:
- 9000:9000
labels:
- "traefik.enable=true"
# frontend
- "traefik.http.routers.portainer_frontend.service=portainer_frontend"
- "traefik.http.routers.portainer_frontend.rule=Host(`${TRAEFIK_PROXY_URL}`)"
- "traefik.http.routers.portainer_frontend.entrypoints=websecure"
- "traefik.http.routers.portainer_frontend.tls.certresolver=tlsresolver"
- "traefik.http.services.portainer_frontend.loadbalancer.server.port=9000"
# edge
- "traefik.http.routers.portainer_edge.service=portainer_edge"
- "traefik.http.routers.portainer_edge.rule=Host(`${TRAEFIK_PROXY_URL}`) && Path(`/edge`)"
- "traefik.http.routers.portainer_edge.entrypoints=websecure"
- "traefik.http.routers.portainer_edge.tls.certresolver=tlsresolver"
- "traefik.http.services.portainer_edge.loadbalancer.server.port=8000"
restart: unless-stopped
networks:
public:
external:
name: ${TRAEFIK_PUBLIC_NETWORK}