Fix migrations - include schema.ts and use npm run db:push
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user