Commit a23046b
committed
fix(docker): run database migrations before server starts
This ensures migrations are applied before Next.js app preparation,
preventing "column does not exist" errors when new columns are added
to the schema.
Changes:
- Add migration.ts as esbuild entry point (compiles to dist/migration.mjs)
- Update Dockerfile CMD to run migrations before server start
- Update Dockerfile.cloud with same migration approach
The proper startup order is now:
1. Run dist/migration.mjs (applies pending migrations)
2. Run pnpm start (starts the server)
This is the standard pattern for production deployments where database
schema must be updated before the application starts making queries.1 parent 9b198f4 commit a23046b
3 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments