superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Enhance Docker (#6504)
Date Thu, 03 Jan 2019 19:33:38 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c01230a  Enhance Docker (#6504)
c01230a is described below

commit c01230afb79584f2abb3daff02e2d6cebdd296bc
Author: oliviermichaelis <38879457+oliviermichaelis@users.noreply.github.com>
AuthorDate: Thu Jan 3 20:33:31 2019 +0100

    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'
---
 contrib/docker/docker-compose.yml   |  3 +++
 contrib/docker/docker-entrypoint.sh | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
index 4911905..3cea89f 100644
--- a/contrib/docker/docker-compose.yml
+++ b/contrib/docker/docker-compose.yml
@@ -7,6 +7,7 @@ services:
       - 6379:6379
     volumes:
       - redis:/data
+
   postgres:
     image: postgres:10
     restart: unless-stopped
@@ -18,6 +19,7 @@ services:
       - 5432:5432
     volumes:
       - postgres:/var/lib/postgresql/data
+
   superset:
     build:
       context: ../../
@@ -44,6 +46,7 @@ services:
       - ./superset_config.py:/home/superset/superset/superset_config.py
       # this is needed for development, remove with SUPERSET_ENV=production
       - ../../superset:/home/superset/superset
+
 volumes:
   postgres:
     external: false
diff --git a/contrib/docker/docker-entrypoint.sh b/contrib/docker/docker-entrypoint.sh
index ff70ffc..169e990 100755
--- a/contrib/docker/docker-entrypoint.sh
+++ b/contrib/docker/docker-entrypoint.sh
@@ -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


Mime
View raw message