jgwehr / homelab-docker

Docker Compose for building a home lab
126 stars 16 forks source link

Caddy with Labels for config #18

Open jgwehr opened 2 years ago

jgwehr commented 2 years ago

https://github.com/lucaslorentz/caddy-docker-proxy

Example: https://p1ngouin.com/posts/why-i-migrated-from-traefik-to-caddy

jgwehr commented 2 years ago

Example from Uptime Kuma docs

version: '3'
networks:
  default:  
    name: 'proxy_network'
services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    restart: unless-stopped
    volumes:  
      - /srv/uptime:/app/data
    labels:   
      caddy: status.example.org
      caddy.reverse_proxy: "* {{ '{{upstreams 3001}}'}}"
  caddy:
    image: "lucaslorentz/caddy-docker-proxy:ci-alpine"
    ports:    
      - "80:80" 
      - "443:443"
    volumes:  
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /srv/caddy/:/data
    restart: unless-stopped
    environment:
      - CADDY_INGRESS_NETWORKS=proxy_network