services:
  caddy:
    image: caddy:latest
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"  # For admin/dashboard access
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
    networks:
      - caddy
      - homelab
      - netbird_storel_netbird
    depends_on: []

volumes:
  caddy_data:
  caddy_config:

networks:
  caddy:
    external: false
  homelab:
    external: true
  netbird_storel_netbird:
    external: true