This commit is contained in:
+3
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user