-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker_dev_hicog_lib.yml
165 lines (154 loc) · 5.29 KB
/
docker_dev_hicog_lib.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
version: "3.9"
# attention this is the docker-compose version
services:
node:
container_name: node
image: node:14-buster
ports:
# only map localhost-port
- "8080:8080"
volumes:
- ${DIR_FRONT_END}:/front_end
environment:
#TODO: switch back to false
- showcase=false
entrypoint:
- "/bin/bash"
command: -c "cd /front_end && npm install && npm run dev"
hicognition:
container_name: flask-server
volumes:
- ${HICOGNITION_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/hicognition
- ${NGS_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/ngs
- ${HICOGNITION_DIR}:/code
- ${SHOWCASE_DIR}:/showcase_data/
environment:
- FLASK_DEBUG=1
- FLASK_APP=/code/hicognition_server.py
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- UPLOAD_DIR=${UPLOAD_DIR}
- CHROM_SIZES=${CHROM_SIZES}
- CHROM_ARMS=${CHROM_ARMS}
ports:
# only map localhost-port
- "5000:5000"
build:
context: "./back_end"
image: hicognition:latest
entrypoint: "/bin/bash"
networks:
hicognition-net:
ipv4_address: 172.18.0.3
command: -c "cd /code && ./boot_dev.sh"
redis-server:
container_name: redis-server
build:
context: "./redis"
networks:
hicognition-net:
ipv4_address: 172.18.0.4
ports:
- 6379:6379
redis-worker-long:
volumes:
- ${HICOGNITION_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/hicognition
- ${NGS_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/ngs
- ${HICOGNITION_DIR}:/code
environment:
- FLASK_DEBUG=1
- FLASK_APP=/code/hicognition_server.py
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- UPLOAD_DIR=${UPLOAD_DIR}
- CHROM_SIZES=${CHROM_SIZES}
- CHROM_ARMS=${CHROM_ARMS}
depends_on:
- redis-server
build:
context: "./back_end"
scale: 3
image: hicognition:latest
entrypoint: "/bin/bash"
networks:
- hicognition-net
# sleeps to wait for redis-server. TODO: make this check nicer!
command: -c "sleep 5 && cd /code/ && rq worker -u ${REDIS_URL} hicognition-tasks-long"
redis-worker-medium:
volumes:
- ${HICOGNITION_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/hicognition
- ${NGS_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/ngs
- ${HICOGNITION_DIR}:/code
environment:
- FLASK_DEBUG=1
- FLASK_APP=/code/hicognition_server.py
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- UPLOAD_DIR=${UPLOAD_DIR}
- CHROM_SIZES=${CHROM_SIZES}
- CHROM_ARMS=${CHROM_ARMS}
depends_on:
- redis-server
build:
context: "./back_end"
scale: 10
image: hicognition:latest
entrypoint: "/bin/bash"
networks:
- hicognition-net
# sleeps to wait for redis-server. TODO: make this check nicer!
command: -c "sleep 5 && cd /code/ && rq worker -u ${REDIS_URL} hicognition-tasks-medium"
redis-worker-short:
volumes:
- ${HICOGNITION_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/hicognition
- ${NGS_LIB_DIR}:/opt/conda/lib/python3.8/site-packages/ngs
- ${HICOGNITION_DIR}:/code
environment:
- FLASK_DEBUG=1
- FLASK_APP=/code/hicognition_server.py
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
- UPLOAD_DIR=${UPLOAD_DIR}
- CHROM_SIZES=${CHROM_SIZES}
- CHROM_ARMS=${CHROM_ARMS}
depends_on:
- redis-server
build:
context: "./back_end"
scale: 3
image: hicognition:latest
entrypoint: "/bin/bash"
networks:
- hicognition-net
# sleeps to wait for redis-server. TODO: make this check nicer!
command: -c "sleep 5 && cd /code/ && rq worker -u ${REDIS_URL} hicognition-tasks-short"
mysql:
container_name: mysql
ports:
# map port out for diagnostics
- "3306:3306"
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=hicognition
- MYSQL_USER=hicognition
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
image: mysql/mysql-server:8.0
volumes:
- ${MYSQL_DATA_DIR}:/var/lib/mysql
- ./mysql/mysql.cnf:/etc/my.cnf
networks:
hicognition-net:
ipv4_address: 172.18.0.9
hugo-builder:
container_name: hugo-builder
image: klakegg/hugo
volumes:
- ${DOC_PATH}:/doc
entrypoint: "/bin/sh"
command: -c "[ ! -d /doc/public ] || rm -r /doc/public && cd /doc && hugo"
networks:
hicognition-net:
ipam:
driver: default
config:
- subnet: 172.18.0.0/16