Mise à jour de index.js
This commit is contained in:
parent
2268fc06c5
commit
559f31b190
|
|
@ -8,4 +8,11 @@ RUN npm ci --omit=dev
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
CMD ["npm", "start"]
|
|
||||||
|
# 🕓 Attente de la DB avant le démarrage (optionnel mais utile)
|
||||||
|
# Ce script attend 10s pour laisser Postgres se lancer
|
||||||
|
CMD sh -c "echo '⏳ Attente de PostgreSQL...' && sleep 10 && npm start"
|
||||||
|
|
||||||
|
# 🩺 Healthcheck interne au conteneur (pour Docker, Jenkins, Traefik)
|
||||||
|
HEALTHCHECK --interval=10s --timeout=3s --retries=5 \
|
||||||
|
CMD wget -qO- http://localhost:4000/health || exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user