docker-compose/examples/caddy/compose.yaml
2024-10-10 09:18:38 +00:00

45 lines
906 B
YAML

version: "3.9"
services:
caddy:
image: caddy:2.8.4-alpine
container_name: caddy
hostname: caddy
restart: always
networks:
- site_network
- app_network
ports:
- "443:443"
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- ./hosts:/etc/hosts:ro
- ./Caddyfile:/etc/caddy/Caddyfile
- ./conf/:/config/
- ./site/:/var/www/
- ./data/:/data/
- ./logs/:/var/log/caddy
- ./cert/:/var/cert/
networks:
site_network:
name: site_network
external: true
# driver: bridge
# driver_opts:
# encrypted: 'true'
# ipam:
# driver: default
# config:
# - subnet: 10.21.24.1/24
app_network:
name: app_network
external: true
# driver: bridge
# driver_opts:
# encrypted: 'true'
# ipam:
# driver: default
# config:
# - subnet: 10.21.23.1/24