-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
216 lines (200 loc) · 5.45 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# #######################################################################
# Config snippets
# #######################################################################
x-restart-policy: &restart-policy unless-stopped
x-logging: &default-logging
options:
max-size: '100m'
max-file: '3'
x-logging-extended: &extended-logging
options:
max-size: '1000m'
max-file: '3'
services:
# #######################################################################
# Data services
# #######################################################################
data-postgis:
build:
context: docker/postgis/
args:
PG_MAJOR: "${STORAGE__PSQL__MAJOR}"
POSTGIS_MAJOR: "${STORAGE__POSTGIS__MAJOR}"
restart: *restart-policy
profiles:
- dev
- prod
environment:
POSTGRES_USER: ${STORAGE__PSQL__USER}
POSTGRES_PASSWORD: ${STORAGE__PSQL__PASSWORD}
POSTGRES_DB: ${STORAGE__PSQL__DB}
volumes:
- data-postgis:/var/lib/postgresql/data
logging: *extended-logging
ports:
# Port must be external for host, because Airbyte spawns docker containers
# when doing an EL-Task. These containers are not within the network odapi_public.
- "127.0.0.1:4003:5432"
networks:
- odapi_private
- odapi_public
healthcheck:
test: pg_isready -U ${STORAGE__PSQL__USER} || exit 1
interval: 5s
retries: 5
data-minio:
image: minio/minio
restart: *restart-policy
volumes:
- data-minio:/data
profiles:
- dev
- prod
environment:
MINIO_ROOT_USER: ${MINIO__ROOT__USER}
MINIO_ROOT_PASSWORD: ${MINIO__ROOT__PASSWORD}
ports:
- 4001:9000
- 4002:9090
networks:
- odapi_private
- odapi_public
logging: *extended-logging
command: server /data --console-address ":9090"
data-redis:
image: redis
restart: *restart-policy
logging: *extended-logging
profiles:
- dev
- prod
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "127.0.0.1:4004:6379"
networks:
- odapi_private
- odapi_public
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
# #######################################################################
# UTILS
# #######################################################################
utils-pgadmin:
image: dpage/pgadmin4
restart: *restart-policy
ports:
- "4005:80"
profiles:
- dev
- prod
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN__DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN__DEFAULT_PASSWORD}
volumes:
- utils-pgadmin:/var/lib/pgadmin
networks:
- odapi_public
extra_hosts:
- "host.docker.internal:host-gateway"
# #######################################################################
# DAGSTER
# #######################################################################
dagster-webserver:
build:
context: .
dockerfile: docker/dagster/Dockerfile
secrets:
- git_token
restart: *restart-policy
init: true
profiles:
- prod
environment:
- DAGSTER__PSQL_META__HOST=${DAGSTER__PSQL_META__HOST}
- DAGSTER__PSQL_META__DB=${DAGSTER__PSQL_META__DB}
- DAGSTER__PSQL_META__USER=${DAGSTER__PSQL_META__USER}
- DAGSTER__PSQL_META__PASS=${DAGSTER__PSQL_META__PASS}
expose:
- "3000"
ports:
- "127.0.0.1:4006:3000"
volumes:
- /tmp/io_manager_storage:/tmp/io_manager_storage
networks:
odapi_public:
odapi_private:
depends_on:
- data-postgis
dagster-daemon:
build:
context: .
dockerfile: docker/dagster/Dockerfile
secrets:
- git_token
restart: *restart-policy
init: true
entrypoint:
- conda
- run
- --no-capture-output
- -n
- odapi
- dagster-daemon
- run
profiles:
- prod
environment:
- DAGSTER__PSQL_META__HOST=${DAGSTER__PSQL_META__HOST}
- DAGSTER__PSQL_META__DB=${DAGSTER__PSQL_META__DB}
- DAGSTER__PSQL_META__USER=${DAGSTER__PSQL_META__USER}
- DAGSTER__PSQL_META__PASS=${DAGSTER__PSQL_META__PASS}
volumes:
- /tmp/io_manager_storage:/tmp/io_manager_storage
networks:
odapi_public:
odapi_private:
depends_on:
- data-postgis
# #######################################################################
# API
# #######################################################################
api:
build:
context: api
dockerfile: Dockerfile
restart: *restart-policy
profiles:
- dev
- prod
ports:
- "8881:80"
networks:
odapi_public:
odapi_private:
depends_on:
- data-postgis
# #######################################################################
# VOLUMES
# #######################################################################
volumes:
data-minio:
driver: local
driver_opts:
type: none
o: bind
device: /mnt/storagebox/docker/volumes/odapi-data-minio/_data
data-postgis:
utils-pgadmin:
# #######################################################################
# Networks
# #######################################################################
networks:
odapi_public:
odapi_private:
# #######################################################################
# Secrets
# #######################################################################
secrets:
git_token:
file: ./docker/.deploy/git_token.txt