docker-compose/examples/caddy/compose.yaml

45 lines
906 B
YAML
Raw Normal View History

version: "3.9"
services:
caddy:
image: caddy:2.7.6-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