aminghadersohi commented on code in PR #38161:
URL: https://github.com/apache/superset/pull/38161#discussion_r3362529797
##########
docker-compose.yml:
##########
@@ -61,6 +61,22 @@ services:
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/templates:/etc/nginx/templates:ro
+ # Wait for the webpack dev server's manifest.json to be served before
+ # starting nginx. This prevents 404s on static assets at startup. The
+ # probe targets host.docker.internal so it works regardless of whether
+ # the dev server runs in the superset-node container
+ # (BUILD_SUPERSET_FRONTEND_IN_DOCKER=true, the default) or directly on
+ # the host (BUILD_SUPERSET_FRONTEND_IN_DOCKER=false).
+ command:
+ - /bin/bash
+ - -c
+ - |
+ echo "Waiting for webpack dev server at
host.docker.internal:9000/static/assets/manifest.json..."
+ until curl -sf -o /dev/null
http://host.docker.internal:9000/static/assets/manifest.json; do
Review Comment:
**MEDIUM** — no timeout or retry ceiling on this wait loop. If the webpack
dev server never comes up (failed `npm install`, build error, or forgotten
start when `BUILD_SUPERSET_FRONTEND_IN_DOCKER=false`), nginx hangs indefinitely
and is indistinguishable from normal waiting. Adding `--max-time N` to `curl`
and/or a counter with a diagnostic exit message would make failures easier to
diagnose. Non-blocking for a dev-only tool, but worth a follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]