services: caddy: image: caddy:latest container_name: caddy restart: always network_mode: "host" security_opt: - label:disable volumes: - /root/compose/caddy/config:/etc/caddy - /etc/localtime:/etc/localtime:ro caddy-manager: image: ghcr.io/daothanhduy305/caddymanager container_name: caddy-manager restart: always environment: ASPNETCORE_ENVIRONMENT: "Production" CaddyService__ConfigDir: "/config" DockerService__CaddyContainerName: "caddy" # Shared key for the HTTP API. While unset the /api endpoints return 503 and stay closed. # Api__Key: "change-me" user: "1000:1000" # The .NET GC sizes its heap against the cgroup limit, so this both caps the # worst case and makes the runtime self-tune downward. mem_limit: 256m memswap_limit: 256m ports: - "8080:8080" volumes: - /root/compose/caddy/config:/config - /var/run/docker.sock:/var/run/docker.sock