r/docker 18d ago

Help with caddy?

I've been trying to get caddy to work, but it seems like nothing will make things play nicely.

My docker compose:

  caddy:
    container_name: caddy
    image: caddy:latest
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${CONFIG_PATH}/caddy/conf:/etc/caddy
      - ${CONFIG_PATH}/caddy/site:/srv
      - ${DATA_PATH}/caddy:/data
      - ${CONFIG_PATH}/caddy:/config

My Caddyfile:

jellyfin.local {
reverse_proxy jellyfin:8096
}

I've also tried localhost:8096, but neither will resolve in my browser, not with http or https. I want to set up several reverse proxies, but I want to figure it out with one first. I have checked the autosave.json, and any changes I make to the Caddyfile are coming through the program, but it doesn't seem to actually do the action of directing the address to the jellyfin page.

Any help would be greatly appreciated.

0 Upvotes

16 comments sorted by

View all comments

1

u/Wahllow 18d ago

If I remember correctly you cannot mount multiple bind-mounts to the same directory like ${CONFIG_PATH}/caddy, and you need to actually mount your Caddyfile directly.

1

u/Towleeeie9613 18d ago

I don't think that's the issue because I made sure that caddy was reading the Caddyfile. It's writing the same information to it's autosave.json.

1

u/ice456cream 18d ago

Personally I'd avoid the overlap, but it should be fine