-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.yml
193 lines (181 loc) · 4.58 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
version: "3.7"
services:
dagster_metadata_db:
image: postgres:11
container_name: dagster_metadata_db
environment:
POSTGRES_USER: "postgres_user"
POSTGRES_PASSWORD: "postgres_password"
POSTGRES_DB: "postgres_db"
networks:
- dagster_network
dagster_code_runner:
build:
context: .
dockerfile: ./container/user_code/Dockerfile
container_name: dagster_code_runner
image: dagster_code_runner_image
restart: always
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
DAGSTER_CURRENT_IMAGE: "dagster_code_runner_image"
WAREHOUSE_USER: sde
WAREHOUSE_PASSWORD: password
WAREHOUSE_DB: warehouse
WAREHOUSE_HOST: warehouse_db
WAREHOUSE_PORT: 5432
CUSTOMER_DB_USER: customer_ms
CUSTOMER_DB_PASSWORD: password
CUSTOMER_DB_DB: customer
CUSTOMER_DB_HOST: customer_db
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_REGION_NAME: us-east-1
AWS_ENDPOINT_URL: http://cloud-store:9000
networks:
- dagster_network
ports:
- "8080:8080"
depends_on:
- risk_api
- data_generator
- cloud-store
warehouse_db:
image: postgres:13
container_name: warehouse_db
environment:
POSTGRES_USER: sde
POSTGRES_PASSWORD: password
POSTGRES_DB: warehouse
volumes:
- ./warehouse_db_setup:/docker-entrypoint-initdb.d
restart: always
ports:
- "5433:5432"
networks:
- dagster_network
dagit_server:
build:
context: .
dockerfile: ./container/dagster/Dockerfile
entrypoint:
- dagit
- -h
- "0.0.0.0"
- -p
- "3000"
- -w
- workspace.yaml
container_name: dagit_server
expose:
- "3000"
ports:
- "3000:3000"
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
volumes:
# Make docker client accessible so we can terminate containers from dagit
- /var/run/docker.sock:/var/run/docker.sock
networks:
- dagster_network
depends_on:
- dagster_metadata_db
- dagster_code_runner
dagster_daemon:
build:
context: .
dockerfile: ./container/dagster/Dockerfile
entrypoint:
- dagster-daemon
- run
container_name: dagster_daemon
restart: on-failure
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
volumes:
# Make docker client accessible so we can launch containers using host docker
- /var/run/docker.sock:/var/run/docker.sock
networks:
- dagster_network
depends_on:
- dagster_metadata_db
- dagster_code_runner
cloud-store:
image: quay.io/minio/minio
container_name: cloud-store
environment:
MINIO_ROOT_USER: AKIAIOSFODNN7EXAMPLE
MINIO_ROOT_PASSWORD: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
command: server /data --console-address ":9001"
ports:
- 9000:9000
- 9001:9001
networks:
- dagster_network
customer_db:
image: postgres:13
container_name: customer_db
environment:
POSTGRES_USER: customer_ms
POSTGRES_PASSWORD: password
POSTGRES_DB: customer
volumes:
- ./customer_db_setup:/docker-entrypoint-initdb.d
restart: always
ports:
- "5432:5432"
networks:
- dagster_network
data_generator:
build:
context: .
dockerfile: ./container/datagenerator/Dockerfile
entrypoint:
- python
- ./generate_fake_orders_customers.py
container_name: data_generator
restart: on-failure
networks:
- dagster_network
depends_on:
- customer_db
- cloud-store
risk_api:
build:
context: .
dockerfile: ./container/risk_api/Dockerfile
container_name: risk_api
restart: on-failure
ports:
- "80:80"
networks:
- dagster_network
dashboard:
image: metabase/metabase
container_name: dashboard
ports:
- "3001:3000"
networks:
- dagster_network
formatter:
image: formatter
container_name: formatter
build:
context: .
dockerfile: ./container/formatter/Dockerfile
volumes:
- ./:/code
networks:
- dagster_network
depends_on:
- risk_api
networks:
dagster_network:
driver: bridge
name: dagster_network