-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
96 lines (89 loc) · 2.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#https://github.com/AntonFriberg/dagster-project-example
#https://docs.dagster.io/deployment/guides/docker
version: "3.7"
services:
# This service runs the postgres DB used by dagster for run storage, schedule storage,
# and event log storage.
docker_postgres:
image: postgres:13
container_name: dagster_postgres
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: "dagster-pg-db"
volumes:
- ./pg-database:/var/lib/postgresql
networks:
- dagster_docker_network
# 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.
docker_grpc_server:
build:
context: .
dockerfile: ./Dockerfile_grpc_server
container_name: dagster
image: docker_grpc_server_image
restart: always
environment:
DAGSTER_POSTGRES_USER: "postgres"
DAGSTER_POSTGRES_PASSWORD: "postgres"
DAGSTER_POSTGRES_DB: "dagster-pg-db"
DAGSTER_CURRENT_IMAGE: "docker_grpc_server_image"
networks:
- dagster_docker_network
# 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.
docker_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: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
networks:
- dagster_docker_network
depends_on:
- docker_postgres
- docker_grpc_server
# 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.
docker_daemon:
build:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagster-daemon
- run
container_name: docker_daemon
restart: on-failure
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
networks:
- dagster_docker_network
depends_on:
- docker_postgres
- docker_grpc_server
networks:
dagster_docker_network:
driver: bridge
name: dagster_docker_network