flatten backend folder
This commit is contained in:
parent
8f2d19d97f
commit
c87a37a826
10
Dockerfile
10
Dockerfile
|
|
@ -9,10 +9,12 @@ COPY . .
|
||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
|
||||||
# 🕓 Attente de la DB avant le démarrage (optionnel mais utile)
|
# 🕓 Attente de la DB avant le démarrage
|
||||||
# Ce script attend 10s pour laisser Postgres se lancer
|
|
||||||
CMD sh -c "echo '⏳ Attente de PostgreSQL...' && sleep 10 && npm start"
|
CMD sh -c "echo '⏳ Attente de PostgreSQL...' && sleep 10 && npm start"
|
||||||
|
|
||||||
# 🩺 Healthcheck interne au conteneur (pour Docker, Jenkins, Traefik)
|
# ✅ Installe curl pour le healthcheck
|
||||||
|
RUN apk add --no-cache curl
|
||||||
|
|
||||||
|
# 🩺 Healthcheck plus fiable avec curl
|
||||||
HEALTHCHECK --interval=10s --timeout=3s --retries=5 \
|
HEALTHCHECK --interval=10s --timeout=3s --retries=5 \
|
||||||
CMD wget -qO- http://localhost:4000/health || exit 1
|
CMD curl -f http://localhost:4000/health || exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user