forked from bento-platform/bento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
202 lines (187 loc) · 5.96 KB
/
docker-compose.dev.yaml
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
version: '3.7'
secrets:
metadata-app-secret:
file: $PWD/tmp/secrets/metadata-app-secret
metadata-db-user:
file: $PWD/tmp/secrets/metadata-db-user
metadata-db-secret:
file: $PWD/tmp/secrets/metadata-db-secret
services:
web:
build:
args:
BENTO_WEB_IS_DEBUG: "true"
BENTO_WEB_USER: ${CURRENT_UID}
volumes:
- ./lib/web/bento_web:/web/bento_web
# Execute npm build/install and watch, and
# nginx "listener" upon container startup
entrypoint: sh /web/dev_startup.sh
extends:
file: docker-compose.yaml
service: web
public:
extends:
file: ./lib/bento_public/docker-compose.yaml
service: public
ports:
- "${BENTO_PUBLIC_EXTERNAL_PORT}:${BENTO_PUBLIC_INTERNAL_PORT}"
gateway:
# Override network aliases, adding BENTOV2_AUTH_DOMAIN
networks:
bridge-net:
aliases:
- ${BENTOV2_DOMAIN}
- ${BENTOV2_PORTAL_DOMAIN}
- ${BENTOV2_AUTH_DOMAIN}
extends:
file: docker-compose.yaml
service: gateway
katsu:
build:
context: $PWD/lib/katsu
dockerfile: Dockerfile.dev
networks:
- bridge-net
depends_on:
- katsu-db
extends:
file: $PWD/lib/katsu/docker-compose.katsu.yaml
service: katsu
volumes:
- ./lib/katsu/katsu:/app/katsu
- ${BENTOV2_KATSU_DEV_WES_VOL_TMP_DIR}:/wes/tmp
environment:
- CHORD_DEBUG=true
- DEBUGGER_PORT=${BENTOV2_KATSU_DEBUGGER_EXTERNAL_PORT}
ports:
- "${BENTOV2_KATSU_EXTERNAL_PORT}:${BENTOV2_KATSU_INTERNAL_PORT}"
- "${BENTOV2_KATSU_DEBUGGER_EXTERNAL_PORT}:${BENTOV2_KATSU_DEBUGGER_INTERNAL_PORT}"
entrypoint:
- /bin/sh
- -c
- |
python manage.py makemigrations
python manage.py migrate
python manage.py runserver --nothreading 0.0.0.0:${BENTOV2_KATSU_INTERNAL_PORT}
katsu-db:
networks:
- bridge-net
extends:
file: $PWD/lib/katsu/docker-compose.katsu.yaml
service: katsu-db
ports:
- "${BENTOV2_KATSU_DB_EXTERNAL_PORT}:${BENTOV2_KATSU_DB_INTERNAL_PORT}"
volumes:
- ${BENTOV2_KATSU_DB_DEV_VOL_DIR}:/var/lib/postgresql/data
federation:
build:
context: $PWD/lib/federation
dockerfile: Dockerfile.dev
environment:
- CHORD_DEBUG=${BENTOV2_FEDERATION_DEV_DEBUG}
- PORT=${BENTOV2_FEDERATION_INTERNAL_PORT}
- DEBUGGER_PORT=${BENTOV2_FEDERATION_DEBUGGER_INTERNAL_PORT}
networks:
- bridge-net
extends:
file: $PWD/lib/federation/docker-compose.federation.yaml
service: federation
volumes:
- ./lib/federation/bento_federation_service:/federation/bento_federation_service
ports:
- "${BENTOV2_FEDERATION_EXTERNAL_PORT}:${BENTOV2_FEDERATION_INTERNAL_PORT}"
- "${BENTOV2_FEDERATION_DEBUGGER_EXTERNAL_PORT}:${BENTOV2_FEDERATION_DEBUGGER_INTERNAL_PORT}"
command: >
sh -c "python run.py"
wes:
build:
context: $PWD/lib/wes
dockerfile: Dockerfile.dev
networks:
- bridge-net
environment:
- CHORD_DEBUG=true
- FLASK_DEBUG=true
- DEBUGGER_PORT=${BENTOV2_WES_DEBUGGER_EXTERNAL_PORT}
extends:
file: $PWD/lib/wes/docker-compose.wes.yaml
service: wes
volumes:
- ./lib/wes/bento_wes:/wes/bento_wes
- ${BENTOV2_WES_DEV_VOL_DIR}:/wes/data
- ${BENTOV2_WES_DEV_VOL_TMP_DIR}:/wes/tmp
- ${BENTOV2_WES_DEV_DROP_BOX_VOL_DIR}:/data
ports:
- "${BENTOV2_WES_EXTERNAL_PORT}:${BENTOV2_WES_INTERNAL_PORT}"
- "${BENTOV2_WES_DEBUGGER_EXTERNAL_PORT}:${BENTOV2_WES_DEBUGGER_INTERNAL_PORT}"
drs:
build:
context: $PWD/lib/drs
dockerfile: Dockerfile.dev
environment:
- FLASK_DEBUG=true
- DEBUGGER_PORT=${BENTOV2_DRS_DEBUGGER_EXTERNAL_PORT}
networks:
- bridge-net
extends:
file: $PWD/lib/drs/docker-compose.drs.yaml
service: drs
ports:
- "${BENTOV2_DRS_EXTERNAL_PORT}:5000"
- "${BENTOV2_DRS_DEBUGGER_EXTERNAL_PORT}:${BENTOV2_DRS_DEBUGGER_INTERNAL_PORT}"
volumes:
- ./lib/drs/bento_drs:/drs/bento_drs
- ./lib/drs/startup.sh:/drs/bento_drs/chord_drs/startup.sh:ro
# Override main drs data directory
- ${BENTOV2_DRS_DEV_VOL_DIR}:/drs/bento_drs/data
- ${BENTOV2_DRS_DEV_WES_VOL_DIR}:/wes/tmp
command: >
sh -c /drs/bento_drs/chord_drs/startup.sh
beacon:
build:
context: $PWD/lib/beacon
dockerfile: Dockerfile.dev
networks:
- bridge-net
environment:
- CHORD_DEBUG=true
- BEACON_DEBUG=true
- FLASK_ENV=development
extends:
file: $PWD/lib/beacon/docker-compose.beacon.yaml
service: beacon
volumes:
- ./lib/beacon/bento_beacon:/beacon/bento_beacon
ports:
- "${BEACON_EXTERNAL_PORT}:${BEACON_INTERNAL_PORT}"
- "${BEACON_DEBUGGER_EXTERNAL_PORT}:${BEACON_DEBUGGER_INTERNAL_PORT}"
command: >
sh -c "python -m debugpy --wait-for-client --listen 0.0.0.0:${BEACON_DEBUGGER_INTERNAL_PORT} -m flask run --no-debugger --no-reload --host=0.0.0.0 "
service-registry:
build:
dockerfile: Dockerfile.dev
volumes:
- ./lib/service-registry/bento_service_registry:/service-registry/bento_service_registry/
- ./lib/service-registry/chord_services.json:/service-registry/bento_service_registry/chord_services.json:ro
environment:
- FLASK_DEBUG=True
extends:
file: docker-compose.yaml
service: service-registry
entrypoint: sh -c "gunicorn bento_service_registry.app:application -w 1 --threads 1 -b 0.0.0.0:${BENTOV2_SERVICE_REGISTRY_INTERNAL_PORT}"
drop-box:
build:
dockerfile: Dockerfile.dev
environment:
# Runtime
- FLASK_DEBUG=True
volumes:
- ./lib/drop-box/bento_drop_box_service:/drop-box/bento_drop_box_service/
extends:
file: docker-compose.yaml
service: drop-box
entrypoint: sh -c "gunicorn bento_drop_box_service.app:application -w 2 --threads 2 -b 0.0.0.0:5000"
networks:
bridge-net:
external: true