mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Enhance Docker (#6504)
Refactored deprecated functionalities:
- Used 'celery worker' command instead of 'superset worker' which is
deprecated since 0.26.0
- Used 'gunicorn' command instead of 'superset runserver'
This commit is contained in:
committed by
Maxime Beauchemin
parent
142e7b6df7
commit
c01230afb7
@@ -4,14 +4,19 @@ set -ex
|
||||
if [ "$#" -ne 0 ]; then
|
||||
exec "$@"
|
||||
elif [ "$SUPERSET_ENV" = "development" ]; then
|
||||
superset worker &
|
||||
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
|
||||
# needed by superset runserver
|
||||
(cd superset/assets/ && npm ci && npm run sync-backend)
|
||||
(cd superset/assets/ && npm run dev) &
|
||||
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
|
||||
FLASK_APP=superset:app flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
|
||||
elif [ "$SUPERSET_ENV" = "production" ]; then
|
||||
superset worker &
|
||||
superset runserver -a 0.0.0.0 -w $((2 * $(getconf _NPROCESSORS_ONLN) + 1))
|
||||
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
|
||||
gunicorn --bind 0.0.0.0:8088 \
|
||||
--workers $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) \
|
||||
--timeout 60 \
|
||||
--limit-request-line 0 \
|
||||
--limit-request-field_size 0 \
|
||||
superset:app
|
||||
else
|
||||
superset --help
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user