Add docker-entrypoint.sh to retry DB connection on startup
The app container starts before DNS resolution is ready, causing prisma db push to fail. Entrypoint now retries until the database is reachable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -35,4 +35,7 @@ RUN mkdir -p /app/uploads
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["sh", "-c", "npx prisma db push --skip-generate && node server.js"]
|
||||
COPY docker-entrypoint.sh ./
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
|
||||
CMD ["./docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user