superset/contrib/docker
Maxim Sukharev 522e8015cf Forward SIGTERM signal to gunicorn (#8156)
Currently docker entrypoint is a bash script.
`docker stop` command (or restart in kubernetes) sends SIGTERM to the
container but it isn't catched by gunicorn.
So gunicorn can't start graceful shutdown which may lead to killing
user's connection and also adds 10s (default value) delay for stopping
until docker sends SIGKILL.
Using `exec` replaces the shell with the process being opened and
signals are propagated correctly.

Ref: https://docs.docker.com/engine/reference/commandline/stop/
Ref: https://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash
2019-09-02 12:43:03 -07:00
..
.env Add licenses to translations (#6732) 2019-01-22 08:21:13 -08:00
Dockerfile Remove gevent installation as a separate layer (#8078) 2019-08-21 11:07:39 -07:00
README.md Fix docker configurations and docker installation guide. (#7827) 2019-07-16 14:00:46 -07:00
docker-compose.yml Fix docker configurations and docker installation guide. (#7827) 2019-07-16 14:00:46 -07:00
docker-entrypoint.sh Forward SIGTERM signal to gunicorn (#8156) 2019-09-02 12:43:03 -07:00
docker-init.sh [docker] Fix docker-init missing FLASK_APP (#7709) 2019-06-14 09:02:11 -07:00
requirements-extra.txt Fix missing `gevent` extra dependency in Docker setup (#7744) 2019-07-18 13:13:08 -07:00
superset_config.py Apply ASF licenses throughout the code base (#5800) 2019-01-15 15:53:27 -08:00

README.md

Getting Start with Superset using Docker

Docker is an easy way to get stated with Superset.

Initializing Database

To initialize the database with a user and example charts, dashboards and datasets run:

docker-compose run -e SUPERSET_LOAD_EXAMPLES=yes --rm superset ./docker-init.sh

This may take a minute.

Normal Operation

To run the container, simply run:

docker-compose up

After several minutes for superset initialization to finish, you can open a browser and view http://localhost:8088 to start your journey.

Developing

While running, the container server will reload on modification of the superset python and javascript source code. Don't forget to reload the page to take the new frontend into account though.

Production

It is also possible to run Superset in non-development mode: in the docker-compose.yml file remove the volumes needed for development and change the variable SUPERSET_ENV to production.

Resource Constraints

If you are attempting to build on a Mac and it exits with 137 you need to increase your docker resources. OSX instructions: https://docs.docker.com/docker-for-mac/#advanced (Search for memory)