mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-26 01:46:03 +00:00
Refactor traefik.yml to add TLS challenge for ACME certificates
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
services:
|
||||
agent:
|
||||
image: portainer/agent
|
||||
environment:
|
||||
AGENT_CLUSTER_ADDR: tasks.agent
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/lib/docker/volumes:/var/lib/docker/volumes
|
||||
networks:
|
||||
- agent-network
|
||||
deploy:
|
||||
mode: global
|
||||
placement:
|
||||
constraints:
|
||||
- node.platform.os == linux
|
||||
|
||||
portainer:
|
||||
image: portainer/portainer-ce
|
||||
command: -H tcp://tasks.agent:9001 --tlsskipverify
|
||||
volumes:
|
||||
- portainer-data:/data
|
||||
networks:
|
||||
- agent-network
|
||||
- traefik-public
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
- node.labels.portainer.portainer-data == true
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik-public
|
||||
- traefik.constraint-label=traefik-public
|
||||
- traefik.http.routers.portainer-http.rule=Host(`port.${DOMAIN?Variable not set}`)
|
||||
- traefik.http.routers.portainer-http.entrypoints=http
|
||||
- traefik.http.routers.portainer-http.middlewares=https-redirect
|
||||
- traefik.http.routers.portainer-https.rule=Host(`port.${DOMAIN?Variable not set}`)
|
||||
- traefik.http.routers.portainer-https.entrypoints=https
|
||||
- traefik.http.routers.portainer-https.tls=true
|
||||
- traefik.http.routers.portainer-https.tls.certresolver=le
|
||||
- traefik.http.services.portainer.loadbalancer.server.port=9000
|
||||
|
||||
networks:
|
||||
agent-network:
|
||||
attachable: true
|
||||
traefik-public:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
portainer-data:
|
||||
Reference in New Issue
Block a user