This commit is contained in:
@@ -1,32 +1,31 @@
|
|||||||
networks:
|
|
||||||
homelab:
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:latest
|
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
||||||
ports:
|
|
||||||
- target: 80
|
|
||||||
published: 80
|
|
||||||
mode: host
|
|
||||||
- target: 443
|
|
||||||
published: 443
|
|
||||||
mode: host
|
|
||||||
- target: 2019
|
|
||||||
published: 2019
|
|
||||||
mode: host
|
|
||||||
networks:
|
networks:
|
||||||
- homelab
|
- caddy
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/swarm-data/caddy/Caddyfile:/etc/caddy/Caddyfile
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- /mnt/swarm-data/caddy/data:/data
|
- ~/swarm-data/caddy/data:/data
|
||||||
- /mnt/swarm-data/caddy/config:/config
|
- ~/swarm-data/caddy/config:/config
|
||||||
|
environment:
|
||||||
|
- CADDY_INGRESS_NETWORKS=caddy
|
||||||
|
secrets:
|
||||||
|
- cloudflare_api_token
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.hostname == p0
|
- node.role == manager
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
delay: 5s
|
|
||||||
max_attempts: 3
|
networks:
|
||||||
|
caddy:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
cloudflare_api_token:
|
||||||
|
external: true
|
||||||
Reference in New Issue
Block a user