|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | +# contributor license agreements. See the NOTICE file distributed with |
| 4 | +# this work for additional information regarding copyright ownership. |
| 5 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | +# (the "License"); you may not use this file except in compliance with |
| 7 | +# the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +# ----------------------------------------------------------------------- |
| 19 | +# We don't support docker compose for production environments. |
| 20 | +# If you choose to use this type of deployment make sure to |
| 21 | +# create you own docker environment file (docker/.env) with your own |
| 22 | +# unique random secure passwords and SECRET_KEY. |
| 23 | +# ----------------------------------------------------------------------- |
| 24 | +x-superset-image: &superset-image dropbackhq/superset-dropback-amd64 |
| 25 | +x-superset-volumes: |
| 26 | + &superset-volumes # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container |
| 27 | + - ./docker:/app/docker |
| 28 | + - superset_home:/app/superset_home |
| 29 | + - ./superset_config.py:/app/superset_config.py |
| 30 | + |
| 31 | +services: |
| 32 | + redis: |
| 33 | + image: redis:7 |
| 34 | + container_name: superset_cache |
| 35 | + restart: unless-stopped |
| 36 | + volumes: |
| 37 | + - redis:/data |
| 38 | + |
| 39 | + db: |
| 40 | + env_file: |
| 41 | + - path: ./.env # default |
| 42 | + required: true |
| 43 | + image: postgres:16 |
| 44 | + container_name: superset_db |
| 45 | + restart: unless-stopped |
| 46 | + volumes: |
| 47 | + - db_home:/var/lib/postgresql/data |
| 48 | + - ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d |
| 49 | + |
| 50 | + superset: |
| 51 | + env_file: |
| 52 | + - path: ./.env # default |
| 53 | + required: true |
| 54 | + image: *superset-image |
| 55 | + container_name: superset_app |
| 56 | + command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"] |
| 57 | + user: "root" |
| 58 | + restart: unless-stopped |
| 59 | + ports: |
| 60 | + - 8088:8088 |
| 61 | + depends_on: |
| 62 | + superset-init: |
| 63 | + condition: service_completed_successfully |
| 64 | + volumes: *superset-volumes |
| 65 | + environment: |
| 66 | + SUPERSET_LOG_LEVEL: "${SUPERSET_LOG_LEVEL:-info}" |
| 67 | + |
| 68 | + superset-init: |
| 69 | + image: *superset-image |
| 70 | + container_name: superset_init |
| 71 | + command: ["/app/docker/docker-init.sh"] |
| 72 | + env_file: |
| 73 | + - path: ./.env # default |
| 74 | + required: true |
| 75 | + depends_on: |
| 76 | + db: |
| 77 | + condition: service_started |
| 78 | + redis: |
| 79 | + condition: service_started |
| 80 | + user: "root" |
| 81 | + volumes: *superset-volumes |
| 82 | + healthcheck: |
| 83 | + disable: true |
| 84 | + environment: |
| 85 | + SUPERSET_LOAD_EXAMPLES: "no" |
| 86 | + SUPERSET_LOG_LEVEL: "${SUPERSET_LOG_LEVEL:-info}" |
| 87 | + |
| 88 | + superset-worker: |
| 89 | + image: *superset-image |
| 90 | + container_name: superset_worker |
| 91 | + command: ["/app/docker/docker-bootstrap.sh", "worker"] |
| 92 | + env_file: |
| 93 | + - path: ./.env # default |
| 94 | + required: true |
| 95 | + restart: unless-stopped |
| 96 | + depends_on: |
| 97 | + superset-init: |
| 98 | + condition: service_completed_successfully |
| 99 | + user: "root" |
| 100 | + volumes: *superset-volumes |
| 101 | + healthcheck: |
| 102 | + test: |
| 103 | + [ |
| 104 | + "CMD-SHELL", |
| 105 | + "celery -A superset.tasks.celery_app:app inspect ping -d celery@$$HOSTNAME", |
| 106 | + ] |
| 107 | + environment: |
| 108 | + SUPERSET_LOG_LEVEL: "${SUPERSET_LOG_LEVEL:-info}" |
| 109 | + |
| 110 | + superset-worker-beat: |
| 111 | + image: *superset-image |
| 112 | + container_name: superset_worker_beat |
| 113 | + command: ["/app/docker/docker-bootstrap.sh", "beat"] |
| 114 | + env_file: |
| 115 | + - path: ./.env # default |
| 116 | + required: true |
| 117 | + restart: unless-stopped |
| 118 | + depends_on: |
| 119 | + superset-init: |
| 120 | + condition: service_completed_successfully |
| 121 | + user: "root" |
| 122 | + volumes: *superset-volumes |
| 123 | + healthcheck: |
| 124 | + disable: true |
| 125 | + environment: |
| 126 | + SUPERSET_LOG_LEVEL: "${SUPERSET_LOG_LEVEL:-info}" |
| 127 | + |
| 128 | +volumes: |
| 129 | + superset_home: |
| 130 | + external: false |
| 131 | + db_home: |
| 132 | + external: false |
| 133 | + redis: |
| 134 | + external: false |
0 commit comments