mirror of
https://github.com/apache/superset.git
synced 2026-05-17 13:55:15 +00:00
Compare commits
3 Commits
fix/mcp-ex
...
docker-up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54e6bd6597 | ||
|
|
1a8bfca18e | ||
|
|
bc76ab4eec |
@@ -111,13 +111,22 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
superset-init-light:
|
superset-init-light:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
superset-node-light:
|
||||||
|
condition: service_healthy
|
||||||
volumes: *superset-volumes
|
volumes: *superset-volumes
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/app/docker/docker-healthcheck.sh"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 30s
|
||||||
|
retries: 3
|
||||||
|
start_period: 60s
|
||||||
environment:
|
environment:
|
||||||
DATABASE_HOST: db-light
|
DATABASE_HOST: db-light
|
||||||
DATABASE_DB: superset_light
|
DATABASE_DB: superset_light
|
||||||
POSTGRES_DB: superset_light
|
POSTGRES_DB: superset_light
|
||||||
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
|
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
|
||||||
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
|
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
|
||||||
|
FLASK_RUN_HOST: 0.0.0.0
|
||||||
GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-}
|
GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-}
|
||||||
GITHUB_SHA: ${GITHUB_SHA:-}
|
GITHUB_SHA: ${GITHUB_SHA:-}
|
||||||
|
|
||||||
@@ -154,6 +163,12 @@ services:
|
|||||||
# it'll mount and watch local files and rebuild as you update them
|
# it'll mount and watch local files and rebuild as you update them
|
||||||
DEV_MODE: "true"
|
DEV_MODE: "true"
|
||||||
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
|
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "/app/docker/docker-healthcheck-node.sh"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 90s
|
||||||
environment:
|
environment:
|
||||||
# set this to false if you have perf issues running the npm i; npm run dev in-docker
|
# set this to false if you have perf issues running the npm i; npm run dev in-docker
|
||||||
# if you do so, you have to run this manually on the host, which should perform better!
|
# if you do so, you have to run this manually on the host, which should perform better!
|
||||||
@@ -163,7 +178,7 @@ services:
|
|||||||
# configuring the dev-server to use the host.docker.internal to connect to the backend
|
# configuring the dev-server to use the host.docker.internal to connect to the backend
|
||||||
superset: "http://superset-light:8088"
|
superset: "http://superset-light:8088"
|
||||||
# Webpack dev server configuration
|
# Webpack dev server configuration
|
||||||
WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-127.0.0.1}"
|
WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-0.0.0.0}"
|
||||||
WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}"
|
WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}"
|
||||||
ports:
|
ports:
|
||||||
- "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces
|
- "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces
|
||||||
|
|||||||
35
docker/docker-healthcheck-node.sh
Executable file
35
docker/docker-healthcheck-node.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Health check for webpack dev server using Node.js HTTP module
|
||||||
|
node -e "
|
||||||
|
const http = require('http');
|
||||||
|
const req = http.request({
|
||||||
|
hostname: 'localhost',
|
||||||
|
port: ${WEBPACK_DEVSERVER_PORT:-9000},
|
||||||
|
path: '/',
|
||||||
|
method: 'HEAD',
|
||||||
|
timeout: 3000
|
||||||
|
}, (res) => {
|
||||||
|
res.resume();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
req.on('error', () => process.exit(1));
|
||||||
|
req.on('timeout', () => { req.destroy(); process.exit(1); });
|
||||||
|
req.end();
|
||||||
|
" || exit 1
|
||||||
Reference in New Issue
Block a user