umami
umami copied to clipboard
Command failed: prisma migrate deploy ERROR: "check-db" exited with 1.
Describe the Bug
running docker compose up with an external postgresql 16 database
- first run
docker compose up
[+] Running 1/0
✔ Container umami_app Created 0.0s
Attaching to umami_app
umami_app | yarn run v1.22.19
umami_app | $ npm-run-all check-db update-tracker start-server
umami_app | $ node scripts/check-db.js
umami_app | ✓ DATABASE_URL is defined.
umami_app | ✓ Database connection successful.
umami_app | ✓ Database version check successful.
umami_app | ✗ Command failed: prisma migrate deploy
umami_app | error Command failed with exit code 1.
umami_app | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
umami_app | ERROR: "check-db" exited with 1.
umami_app | error Command failed with exit code 1.
umami_app | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
umami_app exited with code 1
- database does not get migrated
- app does not start
- running the migration through prisma separately:
docker compose run --rm app yarn prisma migrate deploy
yarn run v1.22.19
$ /app/node_modules/.bin/prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "db.whyservices.net:5432"
6 migrations found in prisma/migrations
Applying migration `01_init`
Applying migration `02_report_schema_session_data`
Applying migration `03_metric_performance_index`
Applying migration `04_team_redesign`
Applying migration `05_add_visit_id`
Applying migration `06_session_data`
The following migration(s) have been applied:
migrations/
└─ 01_init/
└─ migration.sql
└─ 02_report_schema_session_data/
└─ migration.sql
└─ 03_metric_performance_index/
└─ migration.sql
└─ 04_team_redesign/
└─ migration.sql
└─ 05_add_visit_id/
└─ migration.sql
└─ 06_session_data/
└─ migration.sql
All migrations have been successfully applied.
Done in 2.77s.
- migrations are successful, as confirmed when checking db (all tables, are there, the ALTER queries from latest migration have been applied, admin user is present, etc)
- running docker compose up again
docker compose up
[+] Running 1/0
✔ Container umami_app Created 0.0s
Attaching to umami_app
umami_app | yarn run v1.22.19
umami_app | $ npm-run-all check-db update-tracker start-server
umami_app | $ node scripts/check-db.js
umami_app | ✓ DATABASE_URL is defined.
umami_app | ✓ Database connection successful.
umami_app | ✓ Database version check successful.
umami_app | ✗ Command failed: prisma migrate deploy
umami_app | error Command failed with exit code 1.
umami_app | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
umami_app | ERROR: "check-db" exited with 1.
umami_app | error Command failed with exit code 1.
umami_app | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
umami_app exited with code 1
- same outcome as after step 1
i tried to make sense out of scripts/check-db.js but it seems like e doesn't get set for some reason.
Any idea how to further troubleshoot this?
Is there possibly a compatibility issue with postgres 16?
Database
PostgreSQL
Relevant log output
No response
Which Umami version are you using? (if relevant)
latest
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
selfhosted docker compose