48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
x-dagster-env: &dagster_env
|
|
DAGSTER_POSTGRES_USER: ${POSTGRES_USER}
|
|
DAGSTER_POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
DAGSTER_POSTGRES_DB: ${POSTGRES_DB}
|
|
DAGSTER_CURRENT_IMAGE: ${DAGSTER_CURRENT_IMAGE}
|
|
|
|
x-volumes: &volumes
|
|
volumes:
|
|
#- /opt/dagster/storage/:/opt/dagster/home/storage/
|
|
- /opt/dagster/storage/import/:/opt/dagster/home/storage/import/
|
|
- /opt/dagster/storage/deals/:/opt/dagster/home/storage/deals/
|
|
- /opt/dagster/src/app/:/opt/dagster/home/app/
|
|
- /opt/dagster/src/repo.py:/opt/dagster/home/repo.py
|
|
|
|
services:
|
|
# This service runs the gRPC server that loads your user code, in both dagit
|
|
# and dagster-daemon. By setting DAGSTER_CURRENT_IMAGE to its own image, we tell the
|
|
# run launcher to use this same image when launching runs in a new container as well.
|
|
# Multiple containers like this can be deployed separately - each just needs to run on
|
|
# its own port, and have its own entry in the workspace.yaml file that's loaded by dagit.
|
|
user_code:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.code
|
|
container_name: user_code
|
|
image: user_code_image
|
|
restart: always
|
|
environment:
|
|
<<: *dagster_env
|
|
<<: *volumes
|
|
networks:
|
|
- dagster
|
|
|
|
other_image:
|
|
profiles: [ disabled ]
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: other_image
|
|
image: user_code_image
|
|
restart: always
|
|
environment:
|
|
<<: *dagster_env
|
|
DAGSTER_CURRENT_IMAGE: something_else
|
|
<<: *volumes
|
|
networks:
|
|
- dagster
|