Problem getting docker setup to work #624

Closed
opened 2020-08-05 16:27:20 +00:00 by trading-peter · 2 comments

Hi :)

I followed the docker setup docs, tho I'm using a already existing nginx reverse proxy. I can access the login page but the registration doesn't work.

When I browse to /api/v1/info I get {"message":"Not Found"} back. The fact that I get that json string back feels like the api is in general accessable?

Here's the docker compose file

version: '3'

services:
  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: xxx
      MYSQL_DATABASE: vikunja
    volumes:
      - ./db:/var/lib/mysql
    restart: unless-stopped
  api:
    image: vikunja/api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: xxx
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: root
      VIKUNJA_DATABASE_DATABASE: vikunja
    ports:
      - "127.0.0.1:8085:3456"
    volumes:
      - ./files:/app/vikunja/files
    depends_on:
      - db
    restart: unless-stopped
  frontend:
    image: vikunja/frontend
    ports:
      - "127.0.0.1:8083:80"
    restart: unless-stopped

And the nginx proxy config

server {
    listen 443 ssl http2;  listen [::]:443 ssl http2;
    server_name vikunja.[my-domain.com];

    ssl on;
    ssl_certificate      /etc/letsencrypt/live/vikunja.[my-domain.com]/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/vikunja.[my-domain.com]/privkey.pem;

    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;

    http2_idle_timeout 5m;

    location / {
        proxy_pass http://localhost:8083/;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection upgrade;
    }

    location /api/ {
        proxy_pass http://localhost:8085/;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection upgrade;
    }
}

Any pointers where to look at?

Hi :) I followed the docker setup docs, tho I'm using a already existing nginx reverse proxy. I can access the login page but the registration doesn't work. When I browse to `/api/v1/info` I get `{"message":"Not Found"}` back. The fact that I get that json string back feels like the api is in general accessable? Here's the docker compose file ```yml version: '3' services: db: image: mariadb:10 command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci environment: MYSQL_ROOT_PASSWORD: xxx MYSQL_DATABASE: vikunja volumes: - ./db:/var/lib/mysql restart: unless-stopped api: image: vikunja/api environment: VIKUNJA_DATABASE_HOST: db VIKUNJA_DATABASE_PASSWORD: xxx VIKUNJA_DATABASE_TYPE: mysql VIKUNJA_DATABASE_USER: root VIKUNJA_DATABASE_DATABASE: vikunja ports: - "127.0.0.1:8085:3456" volumes: - ./files:/app/vikunja/files depends_on: - db restart: unless-stopped frontend: image: vikunja/frontend ports: - "127.0.0.1:8083:80" restart: unless-stopped ``` And the nginx proxy config ``` server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name vikunja.[my-domain.com]; ssl on; ssl_certificate /etc/letsencrypt/live/vikunja.[my-domain.com]/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/vikunja.[my-domain.com]/privkey.pem; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; http2_idle_timeout 5m; location / { proxy_pass http://localhost:8083/; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; } location /api/ { proxy_pass http://localhost:8085/; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; } } ``` Any pointers where to look at?
Author

I was able to fix it myself. I needed to correct the api url in my docker-compose file for the frontend using the VIKUNJA_API_URL variable as described here: https://vikunja.io/docs/install-frontend/#api-url-configuration-in-docker

I was able to fix it myself. I needed to correct the api url in my docker-compose file for the frontend using the `VIKUNJA_API_URL` variable as described here: https://vikunja.io/docs/install-frontend/#api-url-configuration-in-docker
Owner

Glad you figured it out. What did you set the api url to?

Glad you figured it out. What did you set the api url to?
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#624
No description provided.