-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
201 lines (187 loc) · 5.67 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
version: "3.9"
services:
nginx:
container_name: nginx_front
image: nginx
ports:
- 80:80
volumes:
- ./frontend/dist/:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- dagster_dagit
- rubrix
- metabase
- streamlit_all
- streamlit_spacy
metabase:
container_name: metabase
image: metabase/metabase
environment:
- MB_EMBEDDING_APP_ORIGIN=localhost
ports:
- 3000:3000
volumes:
- ./metabase.db:/metabase.db
# This service runs the postgres DB used by dagster for run storage, schedule storage,
# and event log storage.
dagster_postgresql:
image: postgres:11
container_name: dagster_postgresql
environment:
POSTGRES_USER: ${DAGSTER_POSTGRES_USER}
POSTGRES_PASSWORD: ${DAGSTER_POSTGRES_PASSWORD}
POSTGRES_DB: ${DAGSTER_POSTGRES_DB}
volumes:
- ./postgres-data:/var/lib/postgresql/data
# networks:
# - dagster_network
# This service runs the gRPC server that loads and executes your user code, in both dagit
# and dagster-daemon. By setting DAGSTER_CURRENT_IMAGE to its own image, we tell the
# run launcher to use this same image when launching runs in a new container as well.
# Multiple containers like this can be deployed separately - each just needs to run on
# its own port, and have its own entry in the workspace.yaml file that's loaded by dagit.
dagster_user_code:
build:
context: .
dockerfile: ./Dockerfile_user_code
args:
- GCP_DBT_KEY_PATH=${GCP_DBT_KEY_PATH}
container_name: dagster_user_code
image: dagster_user_code_image
restart: always
environment:
DAGSTER_POSTGRES_USER: ${DAGSTER_POSTGRES_USER}
DAGSTER_POSTGRES_PASSWORD: ${DAGSTER_POSTGRES_PASSWORD}
DAGSTER_POSTGRES_DB: ${DAGSTER_POSTGRES_DB}
DAGSTER_CURRENT_IMAGE: ${DAGSTER_CURRENT_IMAGE}
GCP_DBT_KEY_PATH: ${GCP_DBT_KEY_PATH}
RUBRIX_API_URL: http://rubrix:80
volumes:
- ./dags:/opt/dagster/dags
- ./dbt:/opt/dagster/dbt
- ./models:/opt/dagster/models
- ./spacy_configs:/opt/dagster/spacy_configs
# networks:
# - dagster_network
# This service runs dagit, which loads the user code from the user code container.
# Since our instance uses the QueuedRunCoordinator, any runs submitted from dagit will be put on
# a queue and later dequeued and launched by dagster-daemon.
dagster_dagit:
build:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagit
- -h
- "0.0.0.0"
- -p
- "3000"
- -w
- workspace.yaml
container_name: dagster_dagit
ports:
- "3500:3000"
environment:
DAGSTER_POSTGRES_USER: ${DAGSTER_POSTGRES_USER}
DAGSTER_POSTGRES_PASSWORD: ${DAGSTER_POSTGRES_PASSWORD}
DAGSTER_POSTGRES_DB: ${DAGSTER_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_postgresql
- dagster_user_code
# This service runs the dagster-daemon process, which is responsible for taking runs
# off of the queue and launching them, as well as creating runs from schedules or sensors.
dagster_daemon:
build:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagster-daemon
- run
container_name: dagster_daemon
restart: on-failure
environment:
DAGSTER_POSTGRES_USER: ${DAGSTER_POSTGRES_USER}
DAGSTER_POSTGRES_PASSWORD: ${DAGSTER_POSTGRES_PASSWORD}
DAGSTER_POSTGRES_DB: ${DAGSTER_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_postgresql
- dagster_user_code
streamlit_all:
container_name: streamlit_all
build:
context: .
dockerfile: ./Dockerfile_streamlit
args:
- GCP_DBT_KEY_PATH=${GCP_DBT_KEY_PATH}
image: streamlit
ports:
- "8501:8501"
volumes:
- ./streamlit_apps:/app/
- ./models:/opt/streamlit/models
streamlit_spacy:
container_name: streamlit_spacy
image: streamlit
ports:
- "8502:8501"
command: ["spacy_demo.py"]
volumes:
- ./streamlit_apps:/app/
- ./models:/opt/streamlit/models
rubrix:
image: recognai/rubrix:v0.10.0
container_name: rubrix
ports:
- "6900:80"
environment:
ELASTICSEARCH: elasticsearch:9200
# RUBRIX_LOCAL_AUTH_USERS_DB_FILE: /config/.users.yaml
# volumes:
# - ${PWD}/.users.yaml:/config/.users.yaml
# networks:
# - rubrix_network
# - dagster_network
depends_on:
- elasticsearch
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
container_name: elasticsearch
environment:
- node.name=elasticsearch
- cluster.name=es-rubrix-local
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
# networks:
# - rubrix_network
volumes:
- ./es_data:/usr/share/elasticsearch/data
# kibana:
# image: docker.elastic.co/kibana/kibana:7.11.1
# container_name: kibana
# ports:
# - 5601:5601
# environment:
# ELASTICSEARCH_URL: http://elasticsearch:9200
# ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
# # networks:
# # - rubrix_network
# networks:
# dagster_network:
# driver: bridge
# name: dagster_network
# rubrix_network:
# driver: bridge
# name: rubrix_network