services:
  caddy:
    image: ${CADDY_DOCKER_IMAGE:-caddy:latest}
    container_name: caddy
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
      - caddy_logs:/var/log/caddy

volumes:
  caddy_data:
    name: caddy_data
  caddy_config:
    name: caddy_config
  caddy_logs:
    name: caddy_logs
