Fix Docker entrypoint and apply database migrations for production

Update Dockerfile to correctly copy and execute the entrypoint script, revert CMD to node dist/index.js, and update the SOLUTION_IMMEDIATE.md and add fix-docker-entrypoint.sh to address the 'exec /app/scripts/docker-entrypoint.sh: no such file or directory' error by manually applying database migrations for DLC products.

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:
michaelschal committed 2025-08-18 09:42:19 +00:00
1 parent a2554c4962
commit f279774f04
3 files changed
+80 -59

No files matched your search

+5 -3
View File
@@ -84,6 +84,7 @@ COPY --from=build --chown=nextjs:nodejs /app/shared ./shared
# Copy migration scripts and files
COPY --chown=nextjs:nodejs scripts/ ./scripts/
COPY --chown=nextjs:nodejs migrations/ ./migrations/
COPY --chown=nextjs:nodejs scripts/docker-entrypoint.sh ./scripts/docker-entrypoint.sh
# Create symlink for public files to be accessible from dist
RUN ln -sf /app/dist/public /app/dist/public
@@ -109,8 +110,9 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
# Make scripts executable
RUN chmod +x /app/scripts/auto-migrate-production.sh && \
chmod +x /app/scripts/docker-entrypoint.sh
chmod +x /app/scripts/docker-entrypoint.sh && \
ls -la /app/scripts/ && \
test -f /app/scripts/docker-entrypoint.sh || echo "ERREUR: docker-entrypoint.sh manquant"
# Use entrypoint script for automatic migrations
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]
# Start application normally (migration applied separately)
CMD ["node", "dist/index.js"]