superset/contrib/docker/docker-entrypoint.sh
Victor Noël 02aa3c6395 Improve development experience with Docker (#5966)
- Improve Docker image
  - smaller
  - faster to build
  - deterministict dependencies (see #5958)
- Rework process to simplify setting things up
  - updated documentation
  - less commands to type
  - no files to move and modify
  - optional loading of samples
- Still working in standalone mode (without volumes for superset)
2018-11-27 11:19:55 -08:00

18 lines
513 B
Bash
Executable File

#!/bin/bash
set -ex
if [ "$#" -ne 0 ]; then
exec "$@"
elif [ "$SUPERSET_ENV" = "development" ]; then
superset worker &
# needed by superset runserver
(cd superset/assets/ && yarn && yarn run sync-backend)
(cd superset/assets/ && yarn run dev) &
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))
else
superset --help
fi