-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
174 lines (166 loc) · 5.89 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
name: pathmut-all
version: "3.7"
services:
cg-frontend:
restart: always
build:
context: ./
dockerfile: ./services/frontend/Dockerfile
environment:
CONFIGFILE: /app/config/config_sars2_genbank_dev.yaml
working_dir: /app
volumes:
- ./src:/app/src:cached # Mount the JS code at run-time, so the babel server can recompile the app on file changes
- ./config:/app/config:cached
- ./static_data:/app/static_data:cached
command: "npm start -s"
ports:
- 3000:3000
rsv-frontend:
restart: always
build:
context: ./
dockerfile: ./services/frontend/Dockerfile
environment:
CONFIGFILE: /app/config/config_rsv_genbank.yaml
working_dir: /app
volumes:
- ./src:/app/src:cached # Mount the JS code at run-time, so the babel server can recompile the app on file changes
- ./config:/app/config:cached
- ./static_data:/app/static_data:cached
command: "npm start -s"
ports:
- 3001:3000
flu-frontend:
restart: always
build:
context: ./
dockerfile: ./services/frontend/Dockerfile
environment:
CONFIGFILE: /app/config/config_flu_gisaid.yaml
working_dir: /app
volumes:
- ./src:/app/src:cached # Mount the JS code at run-time, so the babel server can recompile the app on file changes
- ./config:/app/config:cached
- ./static_data:/app/static_data:cached
command: "npm start -s"
ports:
- 3002:3000
cg-server:
restart: always
build:
context: ./
dockerfile: ./services/server/dev.Dockerfile
environment:
- LOGINS=user1:pass1,user2:pass2
- FLASK_APP=cg_server/main.py
- FLASK_ENV=development
- CONFIGFILE=/opt/config/config_sars2_genbank_dev.yaml
- CONSTANTSFILE=/opt/constants/defs.json
- DATA_PATH=/data
- STATIC_DATA_PATH=/opt/static_data
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=cg
- POSTGRES_DB=cg_genbank_dev
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_MAX_CONN=20
- FRONTEND_PORT=3000
# command: "gunicorn --bind :5001 --workers 1 --threads 8 --timeout 0 cg_server.main:app"
command: "flask run --host 0.0.0.0 --port=5001"
ports:
- 5001:5001
working_dir: /app
volumes:
- ./services/server:/app:cached # Mount the server python code at run-time, so that the flask development server can refresh on changes
- ./example_data_genbank/sars2:/data:cached # Mount the data at run-time (for database seeding only). Should prevent sending all the data over unnecessarily at build-time
- ./src/constants:/opt/constants:cached
- ./config:/opt/config:cached
- ./static_data/sars2:/opt/static_data:cached
depends_on:
- db
rsv-server:
restart: always
build:
context: ./
dockerfile: ./services/server/dev.Dockerfile
environment:
- LOGINS=user1:pass1,user2:pass2
- FLASK_APP=cg_server/main.py
- FLASK_ENV=development
- CONFIGFILE=/opt/config/config_rsv_genbank.yaml
- CONSTANTSFILE=/opt/constants/defs.json
- DATA_PATH=/data
- STATIC_DATA_PATH=/opt/static_data
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=cg
- POSTGRES_DB=rsv_genbank_dev
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_MAX_CONN=20
- FRONTEND_PORT=3001
# command: "gunicorn --bind :5001 --workers 1 --threads 8 --timeout 0 cg_server.main:app"
command: "flask run --host 0.0.0.0 --port=5002"
ports:
- 5002:5002
working_dir: /app
volumes:
- ./services/server:/app:cached # Mount the server python code at run-time, so that the flask development server can refresh on changes
- ./example_data_genbank/rsv:/data:cached # Mount the data at run-time (for database seeding only). Should prevent sending all the data over unnecessarily at build-time
- ./src/constants:/opt/constants:cached
- ./config:/opt/config:cached
- ./static_data/rsv:/opt/static_data:cached
depends_on:
- db
flu-server:
restart: always
build:
context: ./
dockerfile: ./services/server/dev.Dockerfile
environment:
- LOGINS=user1:pass1,user2:pass2
- FLASK_APP=cg_server/main.py
- FLASK_ENV=development
- CONFIGFILE=/opt/config/config_flu_gisaid.yaml
- CONSTANTSFILE=/opt/constants/defs.json
- DATA_PATH=/data
- STATIC_DATA_PATH=/opt/static_data
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=cg
- POSTGRES_DB=flu_gisaid_dev
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_MAX_CONN=20
- FRONTEND_PORT=3002
# command: "gunicorn --bind :5001 --workers 1 --threads 8 --timeout 0 cg_server.main:app"
command: "flask run --host 0.0.0.0 --port=5003"
ports:
- 5003:5003
working_dir: /app
volumes:
- ./services/server:/app:cached # Mount the server python code at run-time, so that the flask development server can refresh on changes
- ./data_flu_gisaid_small:/data:cached # Mount the data at run-time (for database seeding only). Should prevent sending all the data over unnecessarily at build-time
- ./src/constants:/opt/constants:cached
- ./config:/opt/config:cached
- ./static_data/flu:/opt/static_data:cached
depends_on:
- db
db:
build:
context: ./services/postgres
dockerfile: ./Dockerfile
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=cg
- POSTGRES_MULTIPLE_DATABASES=cg_genbank_dev,rsv_genbank_dev,flu_gisaid_dev
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_MAX_CONN=20
command: "postgres -c 'config_file=/etc/postgresql/postgresql.conf'"
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./services/postgres/postgres.conf:/etc/postgresql/postgresql.conf # Custom config
ports: # Expose 5432 so we can use DB administration tools
- 5432:5432
volumes:
postgres_data: