mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
feat(dokploy): add wait-for-postgres script and update Dockerfile and package.json
- Introduced a new script to wait for PostgreSQL to be ready before starting the application. - Updated the Dockerfile to include a health check for the application. - Modified the start script in package.json to run the wait-for-postgres script prior to starting the server and migration processes. - Added the wait-for-postgres TypeScript file to handle connection retries to the PostgreSQL database.
This commit is contained in:
@@ -65,4 +65,8 @@ RUN curl -sSL https://railpack.com/install.sh | bash
|
||||
COPY --from=buildpacksio/pack:0.39.1 /usr/local/bin/pack /usr/local/bin/pack
|
||||
|
||||
EXPOSE 3000
|
||||
CMD [ "pnpm", "start" ]
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=10 \
|
||||
CMD curl -fs http://localhost:3000/api/trpc/settings.health || exit 1
|
||||
|
||||
CMD ["sh", "-c", "pnpm run wait-for-postgres && exec pnpm start"]
|
||||
|
||||
Reference in New Issue
Block a user