# This network needs created prior to running the container. # # docker network create --driver=bridge proxy # networks: proxy: external: true volumes: caddy_config: services: caddy: build: context: . dockerfile: Dockerfile container_name: caddy restart: unless-stopped env_file: - .env environment: - CLOUDFLARE_EMAIL=${CF_EMAIL} - CLOUDFLARE_API_TOKEN=${CF_AUTH_TOKEN} - ACME_AGREE=true ports: - 80:80 - 443:443 - "443:443/udp" - 2019:2019 # only needed if you want to access the api. cap_add: - NET_ADMIN volumes: - ./config:/etc/caddy - ./data:/data - caddy_config:/config networks: - proxy security_opt: - no-new-privileges:true