-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
167 lines (153 loc) · 3.55 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
---
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 core services
dagit:
build:
<< : *default-build
target: dagit
container_name: dagit
restart: on-failure
environment:
<< : *default-app-vars
ports:
- "3000:3000"
depends_on:
- postgres
- workspace
profiles:
- dagster
volumes:
- ./dagster.yaml:/opt/dagster/dagster_home/dagster.yaml
- ./workspace.yaml:/opt/dagster/dagster_home/workspace.yaml
networks:
- dagster_network
dagster-daemon:
build:
<< : *default-build
target: daemon
container_name: dagster-daemon
restart: on-failure
environment:
<< : *default-app-vars
depends_on:
- postgres
- workspace
profiles:
- dagster
volumes:
- ./dagster.yaml:/opt/dagster/dagster_home/dagster.yaml
- ./workspace.yaml:/opt/dagster/dagster_home/workspace.yaml
networks:
- dagster_network
postgresql:
image: postgres:11
container_name: postgresql
environment:
POSTGRES_DB: postgres_db
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: postgres_password
volumes:
- ./postgres-dagster:/var/lib/postgresql/data
networks:
- dagster_network
# workspace
data-analytics:
build:
<< : *default-build
target: data-analytics
container_name: data-analytics
restart: always
environment:
<< : *default-app-vars
# Keys for localstack
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
- mongodb
volumes:
- ./workspaces/data_analytics:/opt/dagster/dagster_home/src
profiles:
- dagster
networks:
- dagster_network
data-analytics-test:
build:
<< : *default-build
target: data-analytics-test
volumes:
- ./workspaces/data_analytics:/opt/dagster/dagster_home/src
profiles:
- data-analytics-test
data-science:
build:
<< : *default-build
target: data-science
restart: always
container_name: data-science
environment:
<< : *default-app-vars
# Keys for localstack
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
- mongodb
volumes:
- ./workspaces/data_science:/opt/dagster/dagster_home/src
profiles:
- dagster
networks:
- dagster_network
data-science-test:
build:
<< : *default-build
target: data-science-test
volumes:
- ./workspaces/data_science:/opt/dagster/dagster_home/src
profiles:
- data-science-test
# Formatting
format:
build:
<< : *default-build
target: test
volumes:
- ./workspaces:/src
command: >
/bin/sh -c "black src/ && isort src/ && yamllint ."
profiles:
- format
# Localstack
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:
- ./local_stack.sh:/docker-entrypoint-initaws.d/create_localstack_infra.sh
networks:
- dagster_network
networks:
dagster_network:
driver: bridge
name: dagster_network
volumes:
postgresql: