mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Automate database migrations on Docker startup for production
Update Dockerfile and entrypoint script to automatically run database migrations and apply schema changes upon container initialization. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f9197b9b-a5b3-4469-a27d-930a9e9ee736 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/f9197b9b-a5b3-4469-a27d-930a9e9ee736/i2gFnxm
This commit is contained in:
1 parent
f55a7a6217
commit
a2554c4962
4 files changed
+98
-32
No files matched your search
+5
-3
@@ -107,8 +107,10 @@ USER nextjs
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1
|
||||
|
||||
# Make migration script executable
|
||||
RUN chmod +x /app/scripts/auto-migrate-production.sh
|
||||
# Make scripts executable
|
||||
RUN chmod +x /app/scripts/auto-migrate-production.sh && \
|
||||
chmod +x /app/scripts/docker-entrypoint.sh
|
||||
|
||||
# Start the application normally (migration will be manual or via init script)
|
||||
# Use entrypoint script for automatic migrations
|
||||
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in new issue
Block a user