From a36c136f4a2a0344e2426ba64c0af76c36c18d46 Mon Sep 17 00:00:00 2001 From: Ali Bahjati Date: Wed, 17 Jul 2019 01:30:46 +0430 Subject: [PATCH] Fix docker configurations and docker installation guide. (#7827) * Add Auto option to point radius to make it work as expected since the example using this didn't work because of this (and also as the tooltip says the auto option should be available) * Remove trailing space * Fix docker configurations and docker installation guide. - Fix installation guide regarding passing enviromental variable to docker-compose. - Add gevent installation command in Dockerfile. (Didn't add it in requirements because it's not really a requirement for the whole project) - Add user: root:root to allow superset service to work in development mode. Since access to binded superset directory to local requires root user. - Also add localhost to postgres and redis services to reduce unintended security risk. * Fix docker configurations and docker installation guide. - Fix installation guide regarding passing enviromental variable to docker-compose. - Add gevent installation command in Dockerfile. (Didn't add it in requirements because it's not really a requirement for the whole project) - Add user: root:root to allow superset service to work in development mode. Since access to binded superset directory to local requires root user. - Also add localhost to postgres and redis services to reduce unintended security risk. --- contrib/docker/Dockerfile | 2 ++ contrib/docker/README.md | 2 +- contrib/docker/docker-compose.yml | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index becfb00b26..0773bebf98 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -50,6 +50,8 @@ RUN pip install --upgrade setuptools pip \ && pip install -r requirements.txt -r requirements-dev.txt \ && rm -rf /root/.cache/pip +RUN pip install gevent + COPY --chown=superset:superset superset superset ENV PATH=/home/superset/superset/bin:$PATH \ diff --git a/contrib/docker/README.md b/contrib/docker/README.md index 0c3146f7e7..e85c6c8d8f 100644 --- a/contrib/docker/README.md +++ b/contrib/docker/README.md @@ -26,7 +26,7 @@ Docker is an easy way to get stated with Superset. To initialize the database with a user and example charts, dashboards and datasets run: ```bash -SUPERSET_LOAD_EXAMPLES=yes docker-compose run --rm superset ./docker-init.sh +docker-compose run -e SUPERSET_LOAD_EXAMPLES=yes --rm superset ./docker-init.sh ``` This may take a minute. diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml index cd9b31e074..7a502956da 100644 --- a/contrib/docker/docker-compose.yml +++ b/contrib/docker/docker-compose.yml @@ -20,7 +20,7 @@ services: image: redis:3.2 restart: unless-stopped ports: - - 6379:6379 + - "127.0.0.1:6379:6379" volumes: - redis:/data @@ -32,7 +32,7 @@ services: POSTGRES_PASSWORD: superset POSTGRES_USER: superset ports: - - 5432:5432 + - "127.0.0.1:5432:5432" volumes: - postgres:/var/lib/postgresql/data @@ -52,6 +52,7 @@ services: # If using production, comment development volume below #SUPERSET_ENV: production SUPERSET_ENV: development + user: root:root ports: - 8088:8088 depends_on: