Skip to content

Commit

Permalink
backtracking the backtrack
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 15, 2024
1 parent 9b56f6f commit e721b30
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 21 deletions.
25 changes: 20 additions & 5 deletions docker-compose-image-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ services:

db:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: postgres:15
container_name: superset_db
restart: unless-stopped
Expand All @@ -44,7 +47,10 @@ services:

superset:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: *superset-image
container_name: superset_app
command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
Expand All @@ -60,7 +66,10 @@ services:
container_name: superset_init
command: ["/app/docker/docker-init.sh"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
Expand All @@ -72,7 +81,10 @@ services:
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand All @@ -89,7 +101,10 @@ services:
container_name: superset_worker_beat
command: ["/app/docker/docker-bootstrap.sh", "beat"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand Down
25 changes: 20 additions & 5 deletions docker-compose-non-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ services:

db:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: postgres:15
container_name: superset_db
restart: unless-stopped
Expand All @@ -49,7 +52,10 @@ services:

superset:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
build:
<<: *common-build
container_name: superset_app
Expand All @@ -67,7 +73,10 @@ services:
<<: *common-build
command: ["/app/docker/docker-init.sh"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
depends_on: *superset-depends-on
user: "root"
volumes: *superset-volumes
Expand All @@ -80,7 +89,10 @@ services:
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand All @@ -98,7 +110,10 @@ services:
container_name: superset_worker_beat
command: ["/app/docker/docker-bootstrap.sh", "beat"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: "root"
Expand Down
35 changes: 28 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ services:

db:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
image: postgres:15
container_name: superset_db
restart: unless-stopped
Expand All @@ -67,7 +70,10 @@ services:

superset:
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
build:
<<: *common-build
container_name: superset_app
Expand Down Expand Up @@ -119,7 +125,10 @@ services:
container_name: superset_init
command: ["/app/docker/docker-init.sh"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
depends_on: *superset-depends-on
user: *superset-user
volumes: *superset-volumes
Expand All @@ -137,7 +146,10 @@ services:
container_name: superset_node
command: ["/app/docker/docker-frontend.sh"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
depends_on: *superset-depends-on
volumes: *superset-volumes

Expand All @@ -147,7 +159,10 @@ services:
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: *superset-user
Expand All @@ -166,7 +181,10 @@ services:
container_name: superset_worker_beat
command: ["/app/docker/docker-bootstrap.sh", "beat"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
restart: unless-stopped
depends_on: *superset-depends-on
user: *superset-user
Expand All @@ -180,7 +198,10 @@ services:
container_name: superset_tests_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file:
- docker/.env
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
environment:
DATABASE_HOST: localhost
DATABASE_DB: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ can skip to the next section.
You can install additional python packages and apply config overrides by following the steps
mentioned in [docker/README.md](https://github.com/apache/superset/tree/master/docker#configuration)

You can configure the Docker Compose environment variables for dev and non-dev mode with
`docker/.env`. This environment file sets the environment
for most containers in the Docker Compose setup, and some variables affect multiple containers and
others only single ones.
Note that `docker/.env` sets the default environment variables for all the docker images
used by `docker-compose`, and that `docker/.env-local` can be used to override those defaults.
Also note that `docker/.env-local` is referenced in our `.gitignore`,
preventing developers from risking committing potentially sensitive configuration to the repository.

One important variable is `SUPERSET_LOAD_EXAMPLES` which determines whether the `superset_init`
container will populate example data and visualizations into the metadata database. These examples
Expand Down

0 comments on commit e721b30

Please sign in to comment.