0
0
opnxng-deploy-playbook/templates/compose/caddy.yaml.j2

29 lines
888 B
Plaintext
Raw Normal View History

2023-11-06 10:39:27 +08:00
# {{ ansible_managed }}
services:
caddy:
image: git.opnxng.com/opnxng/caddy:latest
container_name: caddy
security_opt:
- no-new-privileges
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
- HOSTNAME=opnxng.com
- CLOUDFLARE_API_TOKEN={{ cloudflare_api_token }}
volumes:
- {{ docker_dir }}/caddy/GeoLite2-City.mmdb:/etc/caddy/GeoLite2-City.mmdb
- {{ docker_dir }}/caddy/Caddyfile:/etc/caddy/Caddyfile
- {{ docker_dir }}/caddy/caddy-data:/data:rw
- {{ docker_dir }}/caddy/caddy-config:/config:rw
- {{ docker_dir }}/caddy/www:/www:rw
logging:
driver: none
restart: unless-stopped
network_mode: host
# docker run -v ./Caddyfile:/srv/Caddyfile:rw git.opnxng.com/opnxng/caddy:latest caddy fmt --overwrite Caddyfile