So, I have a postgres server running already in a docker container. And I’ve created dll for vikunja to connect to with the following:
create schema if not exists vikunja_ddl authorization vikunja;
GRANT CONNECT ON DATABASE prod TO vikunja;
ALTER SCHEMA vikunja_ddl owner to vikunja;
GRANT USAGE ON SCHEMA vikunja_ddl TO vikunja;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vikunja_ddl TO vikunja;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA vikunja_ddl TO vikunja;
ALTER ROLE vikunja SET search_path TO vikunja_ddl;
Then I have the following docker container for vikunja to connect to the database:
version: '3'
services:
api:
image: vikunja/api
container_name: vikunja
environment:
VIKUNJA_SERVICE_JWTSECRET: le_secret
VIKUNJA_SERVICE_FRONTENDURL: http://my.domain.com/
VIKUNJA_DATABASE_TYPE: postgres
VIKUNJA_DATABASE_HOST: postgres
VIKUNJA_DATABASE_PASSWORD: DB_PW
VIKUNJA_DATABASE_DATABASE: prod
VIKUNJA_DATABASE_USER: vikunja
PUID: $USRID
PGID: $GRPID
ports:
- 3456:3456
volumes:
- $BASE_DIR/config/files:/app/vikunja/files
restart: unless-stopped
networks:
- vikunja-ntwk
- nginx-ntwk
- postgres-ntwk
frontend:
image: vikunja/frontend
container_name: vikunja-frontend
ports:
- 80:80
restart: unless-stopped
networks:
- vikunja-ntwk
- nginx-ntwk
networks:
vikunja-ntwk:
driver: bridge
name: vikunja-ntwk
nginx-ntwk:
external: true
postgres-ntwk:
external: true
(I had to split the above up else it wouldn’t format correctly, but it’s one docker-compose.yaml
file)
So far, so good. when I run docker compose up
I get the following errors:
vikunja-frontend | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
vikunja-frontend | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
vikunja-frontend | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
vikunja-frontend | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
vikunja-frontend | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
vikunja-frontend | /docker-entrypoint.sh: Launching /docker-entrypoint.d/50-injector.sh
vikunja-frontend | info: API URL is /api/v1
vikunja-frontend | info: Sentry enabled: false
vikunja-frontend | info: started at 2023-04-30T00:17:39+00:00
vikunja-frontend | /docker-entrypoint.sh: Launching /docker-entrypoint.d/60-ipv6-disable.sh
vikunja-frontend | /docker-entrypoint.sh: Configuration complete; ready for start up
vikunja | info: creating the new user vikunja with 1010:1010
vikunja | 2023/04/30 00:17:40 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:40.312245194Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 0
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:41 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:42.044766229Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 0
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:43 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:43.817891028Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 0
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:45 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:45.577791509Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 0
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:47 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:47.360838984Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 1
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:49 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:49.88167938Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 1
vikunja | usermod: no changes
vikunja | 2023/04/30 00:17:53 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:17:54.045653715Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 1
vikunja | usermod: no changes
vikunja | 2023/04/30 00:18:01 No config file found, using default or config from environment variables.
vikunja | 2023-04-30T00:18:01.352389231Z: CRITICAL ▶ migration/Migrate 009 Migration failed: migration 20190324205606 failed: pq: relation "tasks" does not exist
vikunja exited with code 1
So, what the heck is going on? Can vikunja only connect to the publich schema in postgres instead of another schema? Is this a bug? Did I fat finger something, what’s going? Some help will be greatly appreciated.