-
-
Notifications
You must be signed in to change notification settings - Fork 96
How to debug failing schema updates? #11
Comments
ps running on
|
I know thats not what you asked for: but may I ask why you execute that command? Kimai uses migrations for upgrading the database. |
You may always ask that. I wanted to run that command because I got 500 responses from the webserver on some pages after having upgraded the docker container. When I looked into the migrations table, there were no recent migrations (in 2019). I thought that was strange combined with the 500. It took me some time to figure out that, when running manual commands in the container, I should make sure the DATABASE_URL environment variable is set (manually unfortunately). Once I got that going I could run the migration command manually. I did a This is how I use the container:
|
Thats a prod container, so unless you really want to debug something, there is no need for But why does a docker update produce 500? |
It might be that ...
... is missing in the |
Ok, so I guess the sources are included. But running the migrations blindly is probably not the best solution. If I am right with my assumption, then I would recommend something like: |
This is caused by the same problem that was in this issue: #14 See the change to the docker file in https://github.com/tobybatch/kimai2/blob/master/prod/README.md#runtime-args The DATABASE_URL needs to be set at container start time. |
How should I / can I debug this?
The database connection is fine, because on startup the container shows some tables.
The text was updated successfully, but these errors were encountered: