Good day. I am having trouble getting vikunja to work within my docker instance. I use SWAG.
This is my docker-compose-yml
version: '3'
services:
db:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: redacted
MYSQL_USER: vikunja
MYSQL_PASSWORD: redacted
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
networks:
- vj-net
api:
image: vikunja/api
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: redacted
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_ENABLEREGISTRATION: "True"
VIKUNJA_SERVICE_TIMEZONE: America/Toronto
VIKUNJA_SERVICE_FRONTENDURL: https://vj.domain.xyz/
VIKUNJA_SERVICE_JWTSECRET: redacted
volumes:
- ./files:/app/vikunja/files
depends_on:
- db
restart: unless-stopped
networks:
- vj-net
frontend:
image: vikunja/frontend
restart: unless-stopped
networks:
- vj-net
proxy:
image: nginx
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
- frontend
restart: unless-stopped
networks:
- vj-net
networks:
vj-net:
external: true
my nginx.conf
server {
listen 80;
location / {
proxy_pass http://frontend:80;
}
location ~* ^/(api|dav|\.well-known)/ {
proxy_pass http://api:3456;
client_max_body_size 20M;
}
}
My swag proxy-conf for vj.mydomain.xyz
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name vj.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app 192.168.2.211;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
I should note, my SWAG instance is on a different physical server on my LAN, thats why im using 192.168.2.211 instead of vj.
I can get to my local instance just fine. when I go to http://local-ip/api/v1 it says I have a missing or malformed JWT. I cannot access Vikunja from my outside domain.