Alec Ryan
05/05/2022, 12:49 PMversion: "3.7"
services:
docker_user_code:
build:
context: .
dockerfile: ./Dockerfile_user_code
container_name: docker_user_code
image: docker_user_code_image
restart: always
environment:
DAGSTER_POSTGRES_USER:
DAGSTER_POSTGRES_PASSWORD:
DAGSTER_POSTGRES_DB:
DAGSTER_CURRENT_IMAGE: docker_user_code_image
networks:
- docker_network
dagit:
build:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagit
- -h
- "0.0.0.0"
- -p
- "3000"
- -w
- workspace.yaml
container_name: docker_dagit
expose:
- "3000"
ports:
- "3000:3000"
environment:
DAGSTER_POSTGRES_USER:
DAGSTER_POSTGRES_PASSWORD:
DAGSTER_POSTGRES_DB:
volumes: # Make docker client accessible so we can terminate containers from dagit
- /var/run/docker.sock:/var/run/docker.sock
networks:
- docker_network
depends_on:
- docker_user_code
docker_daemon:
build:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagster-daemon
- run
container_name: docker_daemon
restart: on-failure
environment:
DAGSTER_POSTGRES_USER:
DAGSTER_POSTGRES_PASSWORD:
DAGSTER_POSTGRES_DB:
volumes: # Make docker client accessible so we can launch containers using host docker
- /var/run/docker.sock:/var/run/docker.sock
networks:
- docker_network
depends_on:
- docker_user_code
networks:
docker_network:
driver: bridge
name: docker_network
FROM python:3.7-slim
RUN mkdir -p /opt/dagster/dagster_home /opt/dagster/app
RUN mkdir /opt/dagster/app/nhl_dagster
RUN mkdir /opt/dagster/app/nhl_dbt
COPY requirements.txt /opt/dagster/app
COPY nhl_dbt /opt/dagster/app/nhl_dbt/
COPY nhl_dagster /opt/dagster/app/nhl_dagster/
COPY workspace.yaml /opt/dagster/app/
ENV DAGSTER_HOME=/opt/dagster/dagster_home/
COPY dagster.yaml /opt/dagster/dagster_home/
WORKDIR /opt/dagster/app
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
EXPOSE 4000
# CMD allows this to be overridden from run launchers or executors that want
# to run other commands against your repository
CMD ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-f", "nhl_dagster/repo.py"]
# Dagster libraries to run both dagit and the dagster-daemon. Does not
# need to have access to any pipeline code.
FROM python:3.7-slim
RUN pip install \
dagster \
dagster-graphql \
dagit \
dagster-postgres \
dagster-docker
# Set $DAGSTER_HOME and copy dagster instance and workspace YAML there
ENV DAGSTER_HOME=/opt/dagster/dagster_home/
RUN mkdir -p $DAGSTER_HOME
COPY dagster.yaml workspace.yaml $DAGSTER_HOME
WORKDIR $DAGSTER_HOME
johann
05/05/2022, 1:53 PMworkspace.yaml
?Alec Ryan
05/05/2022, 1:55 PMload_from:
# Each entry here corresponds to a service in the docker-compose file that exposes user code.
- grpc_server:
host: docker_user_code
port: 4000
location_name: "docker_user_code"
johann
05/05/2022, 1:59 PMAlec Ryan
05/05/2022, 7:25 PMjohann
05/05/2022, 8:39 PMAlec Ryan
05/05/2022, 10:27 PMOperation name: AssetGraphLiveQuery
Message: 'b900fd88-92d4-4c1d-b96b-d2a870837d70'
Path: ["repositoriesOrError","nodes",0,"latestRunByStep"]
Locations: [{"line":32,"column":3}]
johann
05/06/2022, 3:16 PMAlec Ryan
05/06/2022, 3:18 PMjohann
05/06/2022, 3:20 PMAlec Ryan
05/06/2022, 3:26 PMJing Zhang
05/10/2022, 8:40 PMalex
05/10/2022, 8:53 PMJing Zhang
05/10/2022, 10:11 PM