rusackas commented on code in PR #38161:
URL: https://github.com/apache/superset/pull/38161#discussion_r3364258591
##########
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:
Good call — addressed in cf7a9cc. The wait loop now caps at ~5 minutes (150
attempts at 2s) and exits non-zero with a diagnostic message pointing at the
likely cause (dev server not running, e.g. when
`BUILD_SUPERSET_FRONTEND_IN_DOCKER=false` and it wasn't started on the host). I
also added `curl --max-time 5` so a stalled connection can't block a single
attempt indefinitely.
--
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]