Open LeVraiRoiDHyrule opened 1 year ago
FWIW, that Caddyfile could be simplified to this:
vikunja.example.com {
@api path /api/* /.well-known/* /dav/*
reverse_proxy @api api:3456
reverse_proxy frontend:80
}
You'll need to elaborate on what you mean by "none of them seem to be working". We need to see logs. Check your /config
volume, CDP writes the output Caddyfile in there, so you can validate that the labels were transformed to the config you expect.
The solution with the hint form @francislavoie
services:
api:
image: vikunja/api
[... snip ...]
labels:
caddy: placeholder.doesnotexist
caddy.@vikunja_backend.path: '/api/* /.well-known/* /dav/*'
caddy.reverse_proxy: '@vikunja_backend "{{upstreams 3456}}"'
networks:
- caddy
- vik
redis:
image: redis
restart: unless-stopped
networks:
- vik
db:
image: postgres:13
[... snip ...]
networks:
- vik
frontend:
image: vikunja/frontend
environment:
VIKUNJA_API_URL: https://placeholder.doesnotexist/api/v1
restart: unless-stopped
labels:
caddy: placeholder.doesnotexist
caddy.reverse_proxy: "{{upstreams 80}}"
networks:
- caddy
- vik
networks:
caddy:
external: true
vik:
external: false
Hi,
I'm new to caddy docker proxy and I find it wonderful so far. I'm trying to get Vikunja to be reverse proxied by caddy docker proxy. From Vikunja docs, here the configuration to achieve:
I can't figure out what will be the equivalent with labels. I tried this:
and this:
But none of them seem to be working. For both of these, the frontend is accessible but the api is not. Could someone help me to find the correct syntax ?
Thanks in advance for your help and have a great day