fix health check + build
Build and Publish Docker Image / build (push) Successful in 1m35s

This commit is contained in:
2026-09-07 00:05:33 -04:00
parent fdc65c0edb
commit 03bdd22059
3 changed files with 23 additions and 7 deletions
+3 -1
View File
@@ -99,7 +99,9 @@ USER node
WORKDIR /app/apps/frontend
EXPOSE 5173
# /healthz, not /: rendering / reaches the backend, so probing it would report
# a backend outage as a dead frontend, and Traefik drops unhealthy containers.
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD ["node", "-e", "fetch('http://127.0.0.1:'+(process.env.PORT||5173)+'/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
CMD ["node", "-e", "fetch('http://127.0.0.1:'+(process.env.PORT||5173)+'/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
CMD ["node", "server.js", "--prod"]