fix: add automatic database migrations on startup and copy drizzle folder to Docker
- Auto-run migrations when db module loads - Copy drizzle migrations folder to Docker image - Generate missing color column migration - Fixes 500 errors on /api/candles and /api/annotations in Docker
This commit is contained in:
parent
4e13648ebf
commit
6f965c1cc9
2 changed files with 13 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|||
# Copy node_modules for native dependencies like better-sqlite3
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules
|
||||
|
||||
# Copy drizzle migrations
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
|
||||
|
||||
RUN mkdir -p /app/public /app/data && chown -R nextjs:nodejs /app/public /app/data
|
||||
|
||||
ENV NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue