2019-12-03 13:37:18 -05:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2021-01-10 12:29:17 -05:00
|
|
|
x-superset-image: &superset-image apache/superset:latest-dev
|
2021-05-26 04:12:48 -04:00
|
|
|
x-superset-user: &superset-user root
|
2019-12-03 13:37:18 -05:00
|
|
|
x-superset-depends-on: &superset-depends-on
|
2019-12-20 05:57:33 -05:00
|
|
|
- db
|
2019-12-03 13:37:18 -05:00
|
|
|
- redis
|
|
|
|
x-superset-volumes: &superset-volumes
|
|
|
|
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
|
2020-11-20 17:18:17 -05:00
|
|
|
- ./docker:/app/docker
|
2019-12-03 13:37:18 -05:00
|
|
|
- ./superset:/app/superset
|
2020-02-12 10:48:24 -05:00
|
|
|
- ./superset-frontend:/app/superset-frontend
|
2019-12-05 19:47:22 -05:00
|
|
|
- superset_home:/app/superset_home
|
2020-12-14 11:06:19 -05:00
|
|
|
- ./tests:/app/tests
|
2019-12-03 13:37:18 -05:00
|
|
|
|
|
|
|
version: "3.7"
|
|
|
|
services:
|
|
|
|
redis:
|
2021-02-25 03:36:19 -05:00
|
|
|
image: redis:latest
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_cache
|
2019-12-03 13:37:18 -05:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:6379:6379"
|
|
|
|
volumes:
|
|
|
|
- redis:/data
|
|
|
|
|
2019-12-20 05:57:33 -05:00
|
|
|
db:
|
2019-12-03 13:37:18 -05:00
|
|
|
env_file: docker/.env
|
|
|
|
image: postgres:10
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_db
|
2019-12-03 13:37:18 -05:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:5432:5432"
|
|
|
|
volumes:
|
2019-12-20 05:57:33 -05:00
|
|
|
- db_home:/var/lib/postgresql/data
|
2019-12-03 13:37:18 -05:00
|
|
|
|
|
|
|
superset:
|
2020-04-21 15:03:58 -04:00
|
|
|
env_file: docker/.env
|
2020-11-16 10:54:44 -05:00
|
|
|
image: *superset-image
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_app
|
2020-11-20 17:18:17 -05:00
|
|
|
command: ["/app/docker/docker-bootstrap.sh", "app"]
|
2019-12-03 13:37:18 -05:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- 8088:8088
|
2021-05-26 04:12:48 -04:00
|
|
|
user: *superset-user
|
2019-12-03 13:37:18 -05:00
|
|
|
depends_on: *superset-depends-on
|
|
|
|
volumes: *superset-volumes
|
2020-12-14 11:06:19 -05:00
|
|
|
environment:
|
|
|
|
CYPRESS_CONFIG: "${CYPRESS_CONFIG}"
|
2019-12-03 13:37:18 -05:00
|
|
|
|
2021-05-10 12:28:50 -04:00
|
|
|
superset-websocket:
|
|
|
|
container_name: superset_websocket
|
|
|
|
build: ./superset-websocket
|
|
|
|
image: superset-websocket
|
|
|
|
ports:
|
|
|
|
- 8080:8080
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
# Mount everything in superset-websocket into container and
|
|
|
|
# then exclude node_modules and dist with bogus volume mount.
|
|
|
|
# This is necessary because host and container need to have
|
|
|
|
# their own, separate versions of these files. .dockerignore
|
|
|
|
# does not seem to work when starting the service through
|
|
|
|
# docker-compose.
|
|
|
|
#
|
|
|
|
# For example, node_modules may contain libs with native bindings.
|
|
|
|
# Those bindings need to be compiled for each OS and the container
|
|
|
|
# OS is not necessarily the same as host OS.
|
|
|
|
volumes:
|
|
|
|
- ./superset-websocket:/home/superset-websocket
|
|
|
|
- /home/superset-websocket/node_modules
|
|
|
|
- /home/superset-websocket/dist
|
|
|
|
environment:
|
|
|
|
- PORT=8080
|
|
|
|
- REDIS_HOST=redis
|
|
|
|
- REDIS_PORT=6379
|
|
|
|
- REDIS_SSL=false
|
|
|
|
|
2019-12-03 13:37:18 -05:00
|
|
|
superset-init:
|
2020-11-16 10:54:44 -05:00
|
|
|
image: *superset-image
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_init
|
2020-11-20 17:18:17 -05:00
|
|
|
command: ["/app/docker/docker-init.sh"]
|
2019-12-03 13:37:18 -05:00
|
|
|
env_file: docker/.env
|
|
|
|
depends_on: *superset-depends-on
|
2021-05-26 04:12:48 -04:00
|
|
|
user: *superset-user
|
2019-12-03 13:37:18 -05:00
|
|
|
volumes: *superset-volumes
|
2020-12-14 11:06:19 -05:00
|
|
|
environment:
|
|
|
|
CYPRESS_CONFIG: "${CYPRESS_CONFIG}"
|
2019-12-03 13:37:18 -05:00
|
|
|
|
|
|
|
superset-node:
|
2021-09-25 01:26:35 -04:00
|
|
|
image: node:16
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_node
|
2020-11-30 12:35:58 -05:00
|
|
|
command: ["/app/docker/docker-frontend.sh"]
|
2019-12-03 13:37:18 -05:00
|
|
|
env_file: docker/.env
|
|
|
|
depends_on: *superset-depends-on
|
|
|
|
volumes: *superset-volumes
|
|
|
|
|
|
|
|
superset-worker:
|
2020-11-16 10:54:44 -05:00
|
|
|
image: *superset-image
|
2020-04-21 15:03:58 -04:00
|
|
|
container_name: superset_worker
|
2020-11-20 17:18:17 -05:00
|
|
|
command: ["/app/docker/docker-bootstrap.sh", "worker"]
|
2019-12-03 13:37:18 -05:00
|
|
|
env_file: docker/.env
|
|
|
|
restart: unless-stopped
|
|
|
|
depends_on: *superset-depends-on
|
2021-05-26 04:12:48 -04:00
|
|
|
user: *superset-user
|
2019-12-03 13:37:18 -05:00
|
|
|
volumes: *superset-volumes
|
2021-08-09 11:34:51 -04:00
|
|
|
# Bump memory limit if processing selenium / thumbails on superset-worker
|
|
|
|
# mem_limit: 2038m
|
|
|
|
# mem_reservation: 128M
|
2019-12-03 13:37:18 -05:00
|
|
|
|
2021-02-18 12:55:15 -05:00
|
|
|
superset-worker-beat:
|
|
|
|
image: *superset-image
|
|
|
|
container_name: superset_worker_beat
|
|
|
|
command: ["/app/docker/docker-bootstrap.sh", "beat"]
|
|
|
|
env_file: docker/.env
|
|
|
|
restart: unless-stopped
|
|
|
|
depends_on: *superset-depends-on
|
2021-05-26 04:12:48 -04:00
|
|
|
user: *superset-user
|
2021-02-18 12:55:15 -05:00
|
|
|
volumes: *superset-volumes
|
|
|
|
|
2020-05-14 11:58:30 -04:00
|
|
|
superset-tests-worker:
|
2020-11-16 10:54:44 -05:00
|
|
|
image: *superset-image
|
2020-05-14 11:58:30 -04:00
|
|
|
container_name: superset_tests_worker
|
2020-11-20 17:18:17 -05:00
|
|
|
command: ["/app/docker/docker-bootstrap.sh", "worker"]
|
2020-05-14 11:58:30 -04:00
|
|
|
env_file: docker/.env
|
|
|
|
environment:
|
|
|
|
DATABASE_HOST: localhost
|
|
|
|
DATABASE_DB: test
|
|
|
|
REDIS_CELERY_DB: 2
|
|
|
|
REDIS_RESULTS_DB: 3
|
|
|
|
REDIS_HOST: localhost
|
|
|
|
network_mode: host
|
|
|
|
depends_on: *superset-depends-on
|
2021-05-26 04:12:48 -04:00
|
|
|
user: *superset-user
|
2020-05-14 11:58:30 -04:00
|
|
|
volumes: *superset-volumes
|
|
|
|
|
2019-12-03 13:37:18 -05:00
|
|
|
volumes:
|
2019-12-05 19:47:22 -05:00
|
|
|
superset_home:
|
|
|
|
external: false
|
2019-12-20 05:57:33 -05:00
|
|
|
db_home:
|
2019-12-03 13:37:18 -05:00
|
|
|
external: false
|
|
|
|
redis:
|
|
|
|
external: false
|