2024-04-22 18:53:00 +08:00
|
|
|
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:
|
2024-05-22 17:26:00 +08:00
|
|
|
# - subnet: 10.21.24.1/24
|
2024-04-22 18:53:00 +08:00
|
|
|
app_network:
|
|
|
|
name: app_network
|
|
|
|
external: true
|
|
|
|
# driver: bridge
|
|
|
|
# driver_opts:
|
|
|
|
# encrypted: 'true'
|
|
|
|
# ipam:
|
|
|
|
# driver: default
|
|
|
|
# config:
|
2024-05-22 17:26:00 +08:00
|
|
|
# - subnet: 10.21.23.1/24
|