91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
x-postgres-env: &postgres_env
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
x-aws-env: &aws_env
|
|
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
|
|
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
|
|
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/dagster.yaml:/opt/dagster/home/dagster.yaml
|
|
- /opt/dagster/workspace.yaml:/opt/dagster/home/workspace.yaml
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
# - /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
|
|
# - /opt/homebrew/Caskroom/mambaforge/base/envs:/opt/homebrew/Caskroom/mambaforge/base/envs
|
|
|
|
# Towel
|
|
# - /opt/dagster/src/towel.py:/opt/dagster/home/towel.py
|
|
# - /Users/rik/Seafile/Code/company/navara/Klanten/Eneco/towel/towel:/opt/dagster/home/app/towel
|
|
# - /Users/rik/Library/Caches/pypoetry/virtualenvs/towel-V7mtCF2c-py3.9:/venv/towel
|
|
|
|
services:
|
|
# This service runs the postgres DB used by dagster for run storage, schedule storage,
|
|
# and event log storage.
|
|
postgresql:
|
|
image: postgres:11
|
|
container_name: postgresql
|
|
environment:
|
|
<<: *postgres_env
|
|
networks:
|
|
- dagster
|
|
|
|
# This service runs dagit, which loads your user code from the user code container.
|
|
# Since our instance uses the QueuedRunCoordinator, any runs submitted from dagit will be put on
|
|
# a queue and later dequeued and launched by dagster-daemon.
|
|
dagit:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.system
|
|
entrypoint:
|
|
- dagster-webserver
|
|
- -h
|
|
- "0.0.0.0"
|
|
- -p
|
|
- "3000"
|
|
- -w
|
|
- workspace.yaml
|
|
container_name: dagit
|
|
expose:
|
|
- "3000"
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
<<: *dagster_env
|
|
<<: *volumes
|
|
networks:
|
|
- dagster
|
|
depends_on:
|
|
- postgresql
|
|
- user_code
|
|
|
|
# This service runs the dagster-daemon process, which is responsible for taking runs
|
|
# off of the queue and launching them, as well as creating runs from schedules or sensors.
|
|
daemon:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.system
|
|
entrypoint:
|
|
- dagster-daemon
|
|
- run
|
|
container_name: daemon
|
|
restart: on-failure
|
|
environment:
|
|
<<: [ *dagster_env, *aws_env ]
|
|
<<: *volumes
|
|
networks:
|
|
- dagster
|
|
depends_on:
|
|
- postgresql
|