Good Morning, I’ve been trying to get this up and running and have been having trouble with even getting past the starting line. I’m using Docker (the compose file from the example or part of it anyway) and caddy, again using the example set up with modifications to fit my specific instances and naming conventions. I’ve tried a great many variations on this particular compose file and have ensured via the shell that all of the containers can communicate with one another and that Caddy can communicate with the containers. The issue is that after it all comes up, I just get a 404 response from the api with “message: not found” when navigating to the frontend. The front end container can reach the api container via it’s name/ I’ve set the URL environment variable, and the URL with /api/v1/info returns the expected information regardless of set up.
Here’s the Docker Compose file I’m using.
version: '3'
services:
vikunja-db:
container_name: vikunja-db
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_USER: vikunja
MYSQL_PASSWORD: secret
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
networks:
- reverseproxy-nw
vikunja-api:
container_name: vikunja-api
image: vikunja/api
environment:
- VIKUNJA_DATABASE_HOST=vikunja-db
- VIKUNJA_DATABASE_PASSWORD=secret
- VIKUNJA_DATABASE_TYPE=mysql
- VIKUNJA_DATABASE_USER=vikunja
- VIKUNJA_DATABASE_DATABASE=vikunja
- VIKUNJA_SERVICE_JWTSECRET=doublesecret
- VIKUNJA_SERVICE_FRONTENDURL=https://vikunja.example.com/
- VIKUNJA_LOG_LEVEL=DEBUG
- VIKUNJA_LOG_HTTP=stdout
- VIKUNJA_LOG_EVENTS=stdout
volumes:
- ./files:/app/vikunja/files
depends_on:
- vikunja-db
restart: unless-stopped
networks:
- reverseproxy-nw
vikunja-frontend:
container_name: vikunja-frontend
image: vikunja/frontend
environment:
- VIKUNJA_API_URL=http://vikunja-api:3456/api/v1
- VIKUNJA_LOG_LEVEL=DEBUG
- VIKUNJA_LOG_HTTP=stdout
restart: unless-stopped
networks:
- reverseproxy-nw
networks:
reverseproxy-nw:
external: true
Here’s the caddy portion which works for all the other services I’m running.
@vikunja host vikunja.example.com
handle @vikunja {
import localSubnets
reverse_proxy @localSubnets /api/* http://vikunja-api:3456
reverse_proxy @localSubnets /.well-known/* http://vikunja-api:3456
reverse_proxy @localSubnets /dav/* http://vikunja-api:3456
reverse_proxy @localSubnets http://vikunja-frontend:80
}
Any thoughts? Am I missing something simple? If you guys need any additional information or have any questions about the setup, I’m happy to provide whatever you might need. It’s also worth noting that the only logs I see despite the additional logging set up is a 404 response from the api server. I also get a 401 if I just try to navigate to (URL)/api/v1/ by itself. The Local Subnets from the caddy bit just limits access to my internal networks, but I can remove that if it seems like it’d cause an issue.