Fix migrations - include schema.ts and use npm run db:push

This commit is contained in:
Christomatt
2026-01-31 06:52:05 +01:00
parent c512ecea80
commit 82f8d77abe
2 changed files with 23 additions and 17 deletions
+2 -1
View File
@@ -64,11 +64,12 @@ COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Copy drizzle migrations and config
# Copy drizzle migrations, config, and schema (needed for migrations)
COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
COPY --from=builder --chown=nextjs:nodejs /app/drizzle.config.ts ./
COPY --from=builder --chown=nextjs:nodejs /app/package.json ./
COPY --from=builder --chown=nextjs:nodejs /app/package-lock.json ./
COPY --from=builder --chown=nextjs:nodejs /app/src/db/schema.ts ./src/db/schema.ts
# Install drizzle-kit and pg (postgres driver) for migrations
# These are needed at runtime for the entrypoint to run migrations