-
Notifications
You must be signed in to change notification settings - Fork 138
/
docker-compose.yml
159 lines (145 loc) · 3.74 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
---
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"
x-ucr-service:
&default-ucr-service
restart: always
environment:
<< : *default-app-vars
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
depends_on:
- localstack
profiles:
- dagster
volumes:
- ./${COURSE_WEEK}/workspaces:/opt/dagster/dagster_home/workspaces
- ./dbt_test_project:/opt/dagster/dagster_home/dbt_test_project
networks:
- dagster_network
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:1.4.0
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
# ----------------------------------------- #
content:
<< : *default-ucr-service
build:
<< : *default-build
target: content
args:
COURSE_WEEK: ${COURSE_WEEK}
container_name: content
project:
<< : *default-ucr-service
build:
<< : *default-build
target: project
args:
COURSE_WEEK: ${COURSE_WEEK}
container_name: project
challenge:
<< : *default-ucr-service
build:
<< : *default-build
target: challenge
args:
COURSE_WEEK: ${COURSE_WEEK}
container_name: challenge
networks:
dagster_network:
driver: bridge
name: dagster_network
# volumes:
# postgresql: