-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.flu.gisaid.yml
71 lines (69 loc) · 2.38 KB
/
docker-compose.flu.gisaid.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
# docker compose -f docker-compose.flu.gisaid.yml up -d
name: pathmut-flu-gisaid
version: "3.7"
services:
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_dev.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 :5003 --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:
image: postgres:12-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=cg
- POSTGRES_DB=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
frontend:
restart: always
build:
context: ./
dockerfile: ./services/frontend/Dockerfile
environment:
CONFIGFILE: /app/config/config_flu_gisaid_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:
- 3002:3000
volumes:
postgres_data: