30 lines
868 B
YAML
30 lines
868 B
YAML
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"
|
|
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 |