forked from dehume/corise-dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
176 lines (163 loc) · 4.14 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
---
version: "3.9"
x-build:
&default-build
context: .
dockerfile: Dockerfile
x-app-vars:
&default-app-vars
DAGSTER_POSTGRES_HOSTNAME: "postgresql"
DAGSTER_POSTGRES_DB: "postgres_db"
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
services:
# ----------------------------------------- #
# Dagster
# ----------------------------------------- #
dagit:
build:
<< : *default-build
target: dagit
container_name: dagit
restart: on-failure
environment:
<< : *default-app-vars
ports:
- "3000:3000"
depends_on:
- postgresql
profiles:
- dagster
volumes:
- ./${COURSE_WEEK}/dagster.yaml:/opt/dagster/dagster_home/dagster.yaml
- ./${COURSE_WEEK}/workspace.yaml:/opt/dagster/dagster_home/workspace.yaml
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/io_manager_storage:/tmp/io_manager_storage
networks:
- dagster_network
dagster-daemon:
build:
<< : *default-build
target: daemon
container_name: dagster-daemon
restart: on-failure
environment:
<< : *default-app-vars
depends_on:
- postgresql
profiles:
- dagster
volumes:
- ./${COURSE_WEEK}/dagster.yaml:/opt/dagster/dagster_home/dagster.yaml
- ./${COURSE_WEEK}/workspace.yaml:/opt/dagster/dagster_home/workspace.yaml
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/io_manager_storage:/tmp/io_manager_storage
networks:
- dagster_network
# ----------------------------------------- #
# Storage
# ----------------------------------------- #
postgresql:
image: postgres:11
container_name: postgresql
environment:
POSTGRES_DB: "postgres_db"
POSTGRES_USER: "postgres_user"
POSTGRES_PASSWORD: "postgres_password"
profiles:
- dagster
volumes:
- ./${COURSE_WEEK}/postgres-dagster:/var/lib/postgresql/data
networks:
- dagster_network
redis:
image: redis:6.2-alpine
container_name: redis
restart: always
profiles:
- dagster
networks:
- dagster_network
localstack:
image: localstack/localstack
container_name: localstack
ports:
- "4566:4566"
environment:
HOSTNAME: localhost
SERVICES: s3
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
DEFAULT_REGION: us-east-1
volumes:
- ./${COURSE_WEEK}/data://opt/code/localstack/data
- ./${COURSE_WEEK}/local_stack.sh:/docker-entrypoint-initaws.d/create_localstack_infra.sh
networks:
- dagster_network
# ----------------------------------------- #
# UCR
# ----------------------------------------- #
dagster-ucr:
build:
<< : *default-build
target: week_2
container_name: dagster-ucr
restart: always
environment:
<< : *default-app-vars
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
volumes:
- ./${COURSE_WEEK}/dagster_ucr:/opt/dagster/dagster_home/dagster_ucr
profiles:
- week_2
networks:
- dagster_network
content:
build:
<< : *default-build
target: week_3_4_content
args:
COURSE_WEEK: ${COURSE_WEEK}
container_name: content
restart: always
environment:
<< : *default-app-vars
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
volumes:
- ./${COURSE_WEEK}/content:/opt/dagster/dagster_home/content
profiles:
- week_3_4
networks:
- dagster_network
project:
build:
<< : *default-build
target: week_3_4_project
args:
COURSE_WEEK: ${COURSE_WEEK}
container_name: project
restart: always
environment:
<< : *default-app-vars
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
volumes:
- ./${COURSE_WEEK}/project:/opt/dagster/dagster_home/project
profiles:
- week_3_4
networks:
- dagster_network
networks:
dagster_network:
driver: bridge
name: dagster_network
volumes:
postgresql: