This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch codespaces in repository https://gitbox.apache.org/repos/asf/superset.git
commit b8c5b2a34ba5e4503b2bd80480478a59a3b0d86f Author: Maxime Beauchemin <[email protected]> AuthorDate: Mon Jul 28 17:14:52 2025 -0700 improve startup script --- .devcontainer/start-superset.sh | 47 ++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/.devcontainer/start-superset.sh b/.devcontainer/start-superset.sh index 7d70c84dbf..db41aceecf 100755 --- a/.devcontainer/start-superset.sh +++ b/.devcontainer/start-superset.sh @@ -2,8 +2,6 @@ # Startup script for Superset in Codespaces echo "๐ Starting Superset in Codespaces..." -PROJECT_NAME="${CODESPACE_NAME:-superset-dev}" -echo "๐ฆ Using project name: ${PROJECT_NAME}" echo "๐ Frontend will be available at port 9001" # Find the workspace directory (Codespaces clones as 'superset', not 'superset-2') @@ -21,26 +19,41 @@ if ! docker info > /dev/null 2>&1; then sleep 5 fi -# Clean up any existing containers from this project +# Clean up any existing containers echo "๐งน Cleaning up existing containers..." -docker-compose -p "${PROJECT_NAME}" -f docker-compose-light.yml down +docker-compose -f docker-compose-light.yml down # Start services echo "๐๏ธ Building and starting services..." -docker-compose -p "${PROJECT_NAME}" -f docker-compose-light.yml up -d - -# Wait for services to be healthy -echo "โณ Waiting for services to be ready..." -sleep 10 - -# Show status -echo "โ Services started! Status:" -docker-compose -p "${PROJECT_NAME}" -f docker-compose-light.yml ps - echo "" -echo "๐ Default credentials:" +echo "๐ Once started, login with:" echo " Username: admin" echo " Password: admin" echo "" -echo "๐ Access Superset at the forwarded port 9001" -echo "๐ก To view logs: docker-compose -p ${PROJECT_NAME} -f docker-compose-light.yml logs -f" +echo "๐ Running in foreground with live logs (Ctrl+C to stop)..." + +# Run docker-compose and capture exit code +docker-compose -f docker-compose-light.yml up +EXIT_CODE=$? + +# If it failed, provide helpful instructions +if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 130 ]; then # 130 is Ctrl+C + echo "" + echo "โ Superset startup failed (exit code: $EXIT_CODE)" + echo "" + echo "๐ To restart Superset, run:" + echo " .devcontainer/start-superset.sh" + echo "" + echo "๐ง For troubleshooting:" + echo " # View logs:" + echo " docker-compose -f docker-compose-light.yml logs" + echo "" + echo " # Clean restart (removes volumes):" + echo " docker-compose -f docker-compose-light.yml down -v" + echo " .devcontainer/start-superset.sh" + echo "" + echo " # Common issues:" + echo " - Network timeouts: Just retry, often transient" + echo " - Port conflicts: Check 'docker ps'" + echo " - Database issues: Try clean restart with -v" +fi
