docker-compose.yml
version: '3.8'
services:
caddy:
image: caddy
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./caddy/file/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
Caddyfile
xxx.xxxxx.com {
root * /usr/share/caddy
file_server
log {
output file /var/log/caddy/access.log
}
tls xicheng.jiang.1@gmail.com
tls {
protocols tls1.2 tls1.3
ciphers TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
}
}
证书保存在data
目录里,使用tree
命令查看目录结构就能找到