56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
version: "3.9"
|
|
|
|
configs:
|
|
caddy-basic-content:
|
|
file: ../data/caddy/Caddyfile
|
|
labels:
|
|
caddy:
|
|
|
|
services:
|
|
caddy:
|
|
image: marcpartensky/caddy
|
|
ports:
|
|
- "80:80"
|
|
# - "443:443"
|
|
environment:
|
|
CADDY_INGRESS_NETWORKS: caddy
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- caddy_data:/data
|
|
- ../data/caddy/Caddyfile:/etc/Caddyfile
|
|
networks:
|
|
caddy:
|
|
# ipv4_address: 10.0.0.1
|
|
logging:
|
|
# syslog?
|
|
options:
|
|
max-size: 5m
|
|
max-file: "10"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "localhost:80"]
|
|
deploy:
|
|
labels: # Global options
|
|
caddy.email: marc@marcpartensky.com
|
|
update_config:
|
|
parallelism: 1
|
|
delay: 5s
|
|
order: start-first
|
|
failure_action: rollback
|
|
rollback_config:
|
|
order: start-first
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
# restart_policy:
|
|
# condition: any
|
|
resources:
|
|
reservations:
|
|
cpus: '1'
|
|
memory: 500M
|
|
volumes:
|
|
caddy_data:
|
|
|
|
networks:
|
|
caddy:
|
|
external: true
|