Hi there,
Until now I had vikunja running with a sqlite Database. But since this is to unsecure for me (loosing data by deleting the file etc.) I wanted to switch to mysql.
So I added the following lines to my docker compose file:
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_HOST: 1.1.1.1
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_PASSWORD: vikunja
So my compose file now looks like this:
version: '3.8'
services:
  api:
    image: vikunja/api
    container_name: API
    restart: always
    volumes:
      - ~/docker/vikunja/files:/app/vikunja/files
    environment:
      VIKUNJA_SERVICE_ENABLECALDAV: 'false'
      VIKUNJA_SERVICE_ENABLEREGISTRATION: 'false'
      VIKUNJA_SERVICE_ENABLEUSERDELETION: 'false'
      VIKUNJA_SERVICE_TIMEZONE: 'Europe/Berlin'
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_HOST: 1.1.1.1
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_PASSWORD: vikunja
  frontend:
    image: vikunja/frontend
    container_name: Frontend
    restart: always
  proxy:
    image: nginx
    container_name: Proxy
    restart: always
    ports:
      - 80:80/tcp
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
The DB is hosted on an external server, so I entered my IP address for the host env (like VIKUNJA_DATABASE_HOST: 1.1.1.1 (of course I changed this to my servers IP)
When I then start the container, the API endpoint is not available anymore. I always get a 502 Bad Gateway, when I try to access <ip>/api/v1/info and login/register is also not possible anymore.
When I remove the db lines again, everything works fine again.
I also checked the API container logs, and this is the only content:
usermod: no changes
2021/09/29 13:10:21 Config File "config" Not Found in "[/app/vikunja /etc/vikunja /app/vikunja/.config/vikunja]"
2021/09/29 13:10:21 Using default config.
Do I miss something within the config? What can I do to fix this?
Thanks!


