services:
  web:
    image: caddy
    container_name: "caddy"
    ports:
      - "2019:2019"
      - "8880:80"
      - "8443:443"
      - "8443:443/udp"
      - "8448:8448"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy-data:/data
      - caddy-config:/config
    restart: unless-stopped
    networks:
      - caddy-network
    environment:
      - CADDY_ADMIN=0.0.0.0:2019

  caddy-ui:
      image: qmcgaw/caddy-ui
      ports:
        - "8881:8000"
      environment:
        - CADDY_API_ENDPOINT=http://192.168.1.65:2019
      networks:
        - caddy-network
      labels:
        kuma.tools.tag.name: 'Tools'
        kuma.tools.tag.color: '#FF9900'
        kuma.homelab.tag.name: 'Homelab'
        kuma.homelab.tag.color: '#FF9955'
        kuma.organization.tag.name: 'Organization'
        kuma.organization.tag.color: '#FF99AA'
        kuma.caddy.http.name: 'Caddy'
        kuma.caddy.http.url: 'https://caddy.domr.ovh'
        kuma.caddy.http.tag_names: '[{"name": "tools", "value": "" }, {"name": "homelab", "value": "" }]'

networks:
  caddy-network:

volumes:
  caddy-data:
  caddy-config:
