@@ -5,36 +5,39 @@ services:
55 db :
66 image : ' postgres:12.2-alpine'
77 hostname : " ${POSTGRES_HOSTNAME}"
8- restart : always
8+ restart : unless-stopped
99 environment :
1010 POSTGRES_USER : " ${POSTGRES_USER}"
1111 POSTGRES_PASSWORD : " ${POSTGRES_PASSWORD}"
1212 command : postgres -c config_file=/etc/postgresql.conf -c hba_file=/etc/pg_hba.conf
1313 volumes :
1414 - db_data:/var/lib/postgresql/data
15- - ./pg_hba.conf:/etc/pg_hba.conf
16- - ./postgresql.conf:/etc/postgresql.conf
17- networks :
15+ - ./local_dev/ pg_hba.conf:/etc/pg_hba.conf
16+ - ./local_dev/ postgresql.conf:/etc/postgresql.conf
17+ networks :
1818 - headstart
19+
1920 redis :
2021 image : ' redis:6.0-alpine'
21- restart : always
22+ restart : unless-stopped
2223 hostname : " ${REDIS_HOST}"
2324 environment :
2425 REDIS_HOST : " ${REDIS_HOST}"
2526 REDIS_PORT : " ${REDIS_PORT}"
2627 command : ["redis-server", "/etc/redis/redis.conf", "--bind", "${REDIS_HOST}", "--port", "${REDIS_PORT}"]
2728 volumes :
2829 - ' redis:/var/lib/redis/data'
29- - ./redis.conf:/etc/redis/redis.conf
30+ - ./local_dev/ redis.conf:/etc/redis/redis.conf
3031 ports :
3132 - " 127.0.0.1:${REDIS_PORT}:6379"
32- networks :
33+ networks :
3334 - headstart
3435
3536 api :
36- image : api:${SERVICE_VERSION}
37- restart : always
37+ build :
38+ context : server
39+ dockerfile : workers/api/Dockerfile
40+ restart : unless-stopped
3841 environment :
3942 SERVICE_VERSION : " ${SERVICE_VERSION}"
4043 REDIS_HOST : " ${REDIS_HOST}"
@@ -44,20 +47,23 @@ services:
4447 BEHIND_PROXY : " ${BEHIND_PROXY}"
4548 DEFAULT_DATABASE : " ${DEFAULT_DATABASE}"
4649 FLASK_ENV : " ${FLASK_ENV}"
47- command : ["gunicorn ", "--workers", "10", "--threads", "2", "-b", "0.0.0.0:${API_PORT}", " app:app", "--timeout", "300 "]
50+ command : ["python ", " app.py "]
4851 volumes :
4952 - ./api_cache:/var/api_cache
53+ - ./server/workers/api/src:/api
5054 depends_on :
5155 - redis
5256 - base
5357 - pubmed
5458 - openaire
55- networks :
59+ networks :
5660 - headstart
5761
5862 persistence :
59- image : persistence:${SERVICE_VERSION}
60- restart : always
63+ build :
64+ context : server
65+ dockerfile : workers/persistence/Dockerfile
66+ restart : unless-stopped
6167 environment :
6268 SERVICE_VERSION : " ${SERVICE_VERSION}"
6369 POSTGRES_USER : " ${POSTGRES_USER}"
@@ -68,27 +74,16 @@ services:
6874 DEFAULT_DATABASE : " ${DEFAULT_DATABASE}"
6975 FLASK_ENV : " ${FLASK_ENV}"
7076 SSH_AUTH_SOCK : " /run/host-services/ssh-auth.sock"
71- command : ["gunicorn", "--workers", "10", "--threads", "2", "-b", "0.0.0.0:${API_PORT}", "app:app", "--timeout", "300"]
72- networks :
73- - headstart
74-
75- gsheets :
76- image : gsheets:${SERVICE_VERSION}
77- environment :
78- SERVICE_VERSION : " ${SERVICE_VERSION}"
79- REDIS_HOST : " ${REDIS_HOST}"
80- REDIS_PORT : " ${REDIS_PORT}"
81- REDIS_DB : " ${REDIS_DB}"
82- REDIS_PASSWORD : " ${REDIS_PASSWORD}"
83- LOGLEVEL : " ${LOGLEVEL}"
84- restart : always
85- depends_on :
86- - redis
87- networks :
77+ command : ["python", "app.py"]
78+ volumes :
79+ - ./server/workers/persistence/src:/api
80+ networks :
8881 - headstart
8982
9083 dataprocessing :
91- image : dataprocessing:${SERVICE_VERSION}
84+ build :
85+ context : server
86+ dockerfile : workers/dataprocessing/Dockerfile
9287 environment :
9388 SERVICE_VERSION : " ${SERVICE_VERSION}"
9489 REDIS_HOST : " ${REDIS_HOST}"
@@ -103,17 +98,20 @@ services:
10398 LANG : " en_US.UTF-8"
10499 RENV_PATHS_CACHE : /renv/cache
105100 PYTHONIOENCODING : " utf-8"
106- restart : always
101+ restart : unless-stopped
107102 volumes :
108- - /opt/local /renv/cache:/renv/cache
103+ - ./local_dev /renv/cache:/renv/cache
109104 - /var/log/headstart:/var/log/headstart
105+ - ./server/preprocessing/other-scripts:/headstart/other-scripts
110106 depends_on :
111107 - redis
112- networks :
108+ networks :
113109 - headstart
114110
115111 base :
116- image : base:${SERVICE_VERSION}
112+ build :
113+ context : server
114+ dockerfile : workers/base/Dockerfile
117115 environment :
118116 SERVICE_VERSION : " ${SERVICE_VERSION}"
119117 REDIS_HOST : " ${REDIS_HOST}"
@@ -129,17 +127,20 @@ services:
129127 RENV_PATHS_CACHE : /renv/cache
130128 PYTHONIOENCODING : " utf-8"
131129 R_BASE_APIKEY : " ${R_BASE_APIKEY}"
132- restart : always
130+ restart : unless-stopped
133131 volumes :
134- - /opt/local /renv/cache:/renv/cache
132+ - ./local_dev /renv/cache:/renv/cache
135133 - /var/log/headstart:/var/log/headstart
134+ - ./server/preprocessing/other-scripts:/headstart/other-scripts
136135 depends_on :
137136 - redis
138137 networks :
139138 - headstart
140139
141140 pubmed :
142- image : pubmed:${SERVICE_VERSION}
141+ build :
142+ context : server
143+ dockerfile : workers/pubmed/Dockerfile
143144 environment :
144145 SERVICE_VERSION : " ${SERVICE_VERSION}"
145146 REDIS_HOST : " ${REDIS_HOST}"
@@ -154,17 +155,20 @@ services:
154155 LANG : " en_US.UTF-8"
155156 RENV_PATHS_CACHE : /renv/cache
156157 PYTHONIOENCODING : " utf-8"
157- restart : always
158+ restart : unless-stopped
158159 volumes :
159- - /opt/local /renv/cache:/renv/cache
160+ - ./local_dev /renv/cache:/renv/cache
160161 - /var/log/headstart:/var/log/headstart
162+ - ./server/preprocessing/other-scripts:/headstart/other-scripts
161163 depends_on :
162164 - redis
163165 networks :
164166 - headstart
165167
166168 openaire :
167- image : openaire:${SERVICE_VERSION}
169+ build :
170+ context : server
171+ dockerfile : workers/openaire/Dockerfile
168172 environment :
169173 SERVICE_VERSION : " ${SERVICE_VERSION}"
170174 REDIS_HOST : " ${REDIS_HOST}"
@@ -179,15 +183,32 @@ services:
179183 LANG : " en_US.UTF-8"
180184 RENV_PATHS_CACHE : /renv/cache
181185 PYTHONIOENCODING : " utf-8"
182- restart : always
186+ restart : unless-stopped
183187 volumes :
184- - /opt/local /renv/cache:/renv/cache
188+ - ./local_dev /renv/cache:/renv/cache
185189 - /var/log/headstart:/var/log/headstart
190+ - ./server/preprocessing/other-scripts:/headstart/other-scripts
186191 depends_on :
187192 - redis
188193 networks :
189194 - headstart
190195
196+ searchflow :
197+ build : local_dev/searchflow-container
198+ volumes :
199+ - ../project-website:/var/www/html
200+ - ./local_dev/config_local_projectwebsite.php:/var/www/html/config_local.php
201+ - ../search-flow/:/var/www/html/search-flow
202+ - ./local_dev/config_local_searchflow.ini:/var/www/html/search-flow/config_local.ini
203+ - ../Headstart:/var/www/html/headstart
204+ - ./local_dev/config_local_headstart.ini:/var/www/html/headstart/server/preprocessing/conf/config_local.ini
205+ - ./local_dev/entrypoint.php:/var/www/html/entrypoint.php
206+ ports :
207+ - 127.0.0.1:8085:80
208+ networks :
209+ - headstart
210+
211+
191212volumes :
192213 redis :
193214 db_data :
@@ -196,4 +217,4 @@ volumes:
196217 driver : local
197218
198219networks :
199- headstart:
220+ headstart :
0 commit comments