shell-host/containers/caddy/docker-compose.yaml

39 lines
914 B
YAML
Raw Normal View History

services:
caddy:
container_name: ${NAME:-caddy}
image: ${IMAGE:-caddy}
# if no $CONF is given then Caddyfile in ${PWD}/conf:/opt/caddy/conf will be used
command: caddy run ${CONF}
hostname: ${NAME:-caddy}
env_file:
- $CREDENTIALS
volumes:
- data:/opt/caddy/data
- settings:/opt/caddy/settings
- conf:/opt/caddy/conf
# - files:/opt/caddy/files
restart: unless-stopped
ports:
- 80:80
- 443:443
# port 2019 is for API, not required
# - 2019:2019
# binding data and settings are not required
# But if there volumes are deleted caddy will need to redo all the certs
volumes:
data:
# driver_opts:
# type: none
# device: ${PWD}/data
# o: bind
settings:
# driver_opts:
# type: none
# device: ${PWD}/config
# o: bind
conf:
driver_opts:
type: none
device: ${PWD}/conf
o: bind