You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2026/06/23 14:02:04 UTC
(superset) branch master updated: fix(docker): restore working `docker compose up` for the dev stack (#41077)
This is an automated email from the ASF dual-hosted git repository.
betodealmeida pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 5d06438a075 fix(docker): restore working `docker compose up` for the dev stack (#41077)
5d06438a075 is described below
commit 5d06438a075f35014114209475bd5e1fe24c0f6a
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Tue Jun 23 10:01:57 2026 -0400
fix(docker): restore working `docker compose up` for the dev stack (#41077)
---
docker-compose.yml | 17 ++++++++++-------
docker/docker-bootstrap.sh | 16 +++++++++-------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/docker-compose.yml b/docker-compose.yml
index 6d1e2bc3f05..1c0d1592d17 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -72,20 +72,23 @@ services:
- -c
- |
url="http://host.docker.internal:9000/static/assets/manifest.json"
- max_attempts=150 # ~5 minutes at 2s intervals
- echo "Waiting for webpack dev server at $url..."
+ max_attempts=300 # ~10 minutes at 2s intervals; first build can be slow
+ echo "Waiting for webpack dev server at $$url..."
attempt=0
- until curl -sf --max-time 5 -o /dev/null "$url"; do
- attempt=$((attempt + 1))
- if [ "$attempt" -ge "$max_attempts" ]; then
- echo "ERROR: webpack dev server did not serve $url after $max_attempts attempts (~5 minutes)." >&2
+ until curl -sf --max-time 5 -H "Host: localhost" -o /dev/null "$$url"; do
+ attempt=$$((attempt + 1))
+ if [ "$$attempt" -ge "$$max_attempts" ]; then
+ echo "ERROR: webpack dev server did not serve $$url after $$max_attempts attempts." >&2
echo "Is the dev server running? With BUILD_SUPERSET_FRONTEND_IN_DOCKER=false you must start it on the host (e.g. 'npm run dev' in superset-frontend)." >&2
exit 1
fi
+ if [ $$((attempt % 15)) -eq 0 ]; then
+ echo "Still waiting for webpack dev server... ($$attempt/$$max_attempts)"
+ fi
sleep 2
done
echo "Webpack dev server is ready; starting nginx."
- exec nginx -g 'daemon off;'
+ exec /docker-entrypoint.sh nginx -g 'daemon off;'
redis:
image: redis:7
diff --git a/docker/docker-bootstrap.sh b/docker/docker-bootstrap.sh
index 51286c537e4..8eec76cbcd0 100755
--- a/docker/docker-bootstrap.sh
+++ b/docker/docker-bootstrap.sh
@@ -81,17 +81,19 @@ case "${1}" in
app)
echo "Starting web app (using development server)..."
- # Environment-based debugger control for security
- # Only enable Werkzeug interactive debugger when explicitly requested
- # Modern Werkzeug (3.0+) includes PIN protection, but defense-in-depth approach
- # Override FLASK_DEBUG so the effective state matches SUPERSET_DEBUG_ENABLED even
- # when FLASK_DEBUG=true is inherited from docker/.env or .flaskenv
+ # Default to Flask debug mode in this dev compose entrypoint so the Talisman
+ # dev CSP (which permits 'unsafe-eval' required by React Refresh / HMR) is
+ # served. Operators can still set FLASK_DEBUG=false in docker/.env-local
+ # to exercise the production-like CSP and error handling.
+ : "${FLASK_DEBUG:=1}"
+ export FLASK_DEBUG
+
+ # Werkzeug's interactive debugger (/console) is a separate, security-sensitive
+ # feature and must be opted into explicitly via SUPERSET_DEBUG_ENABLED=true.
if [[ "${SUPERSET_DEBUG_ENABLED:-}" == "true" ]]; then
- export FLASK_DEBUG=1
DEBUGGER_FLAG="--debugger"
echo " ⚠️ Werkzeug debugger enabled (requires PIN for /console access)"
else
- export FLASK_DEBUG=0
DEBUGGER_FLAG="--no-debugger"
echo " 🔒 Werkzeug debugger disabled (set SUPERSET_DEBUG_ENABLED=true to enable)"
fi