11# docker compose versions
2- version : " 2.3"
2+ version : ' 2.3'
33
44services :
55 # This dummy service provides shared configuration for all Node deps
@@ -30,7 +30,7 @@ services:
3030 retries : 10
3131 ports :
3232 # HMR port
33- - " 9992:9992"
33+ - ' 9992:9992'
3434 environment :
3535 - NODE_ENV=development
3636 depends_on :
@@ -76,7 +76,7 @@ services:
7676 # mongodb
7777 mongo :
7878 image : docker.io/library/mongo:8
79- command : [" --replSet", " rs0", " --bind_ip_all", " --port", " 27017" ]
79+ command : [' --replSet', ' rs0', ' --bind_ip_all', ' --port', ' 27017' ]
8080 ports :
8181 - 27017:27017
8282 healthcheck :
@@ -105,35 +105,62 @@ services:
105105 init : true
106106 command :
107107 [
108- " uvicorn" ,
109- " --host" ,
110- " 0.0.0.0" ,
111- " --port" ,
112- " 80 " ,
113- " --reload" ,
114- " --factory" ,
115- " datalad_service.app:create_app" ,
116- " --workers" ,
117- " 8 " ,
118- " --timeout-keep-alive" ,
119- " 30 " ,
120- " --log-level" ,
121- " debug" ,
108+ ' uvicorn' ,
109+ ' --host' ,
110+ ' 0.0.0.0' ,
111+ ' --port' ,
112+ ' 80 ' ,
113+ ' --reload' ,
114+ ' --factory' ,
115+ ' datalad_service.app:create_app' ,
116+ ' --workers' ,
117+ ' 8 ' ,
118+ ' --timeout-keep-alive' ,
119+ ' 30 ' ,
120+ ' --log-level' ,
121+ ' debug' ,
122122 ]
123123 networks :
124124 default :
125125 aliases :
126126 - datalad-0
127127 - datalad-1
128128
129+ taskiq :
130+ build :
131+ context : services/datalad
132+ volumes :
133+ - ${PERSISTENT_DIR}/datalad:/datalad:z
134+ - ./services/datalad/datalad_service:/srv/datalad_service
135+ - ./datalad-key:/datalad-key
136+ env_file : ./config.env
137+ init : true
138+ command : [
139+ ' taskiq' ,
140+ ' worker' ,
141+ ' datalad_service.broker:broker' ,
142+ ' --tasks-pattern' ,
143+ ' datalad_service/tasks/*.py' ,
144+ ' --fs-discover' ,
145+ ' --reload'
146+ ]
147+ depends_on :
148+ redis :
149+ condition : service_started
150+ networks :
151+ default :
152+ aliases :
153+ - datalad-0
154+ - datalad-1
155+
129156 # nginx + app
130157 web :
131158 image : docker.io/library/nginx:1.16.1
132159 volumes :
133160 - ./nginx/nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro
134161 ports :
135- - " 8110:8110"
136- - " 9876:80"
162+ - ' 8110:8110'
163+ - ' 9876:80'
137164 depends_on :
138165 server :
139166 condition : service_healthy
@@ -147,7 +174,7 @@ services:
147174 platform : ${ES_PLATFORM}
148175 environment :
149176 discovery.type : single-node
150- cluster.routing.allocation.disk.threshold_enabled : " true"
177+ cluster.routing.allocation.disk.threshold_enabled : ' true'
151178 cluster.routing.allocation.disk.watermark.flood_stage : 1gb
152179 cluster.routing.allocation.disk.watermark.low : 10gb
153180 cluster.routing.allocation.disk.watermark.high : 5gb
@@ -158,10 +185,10 @@ services:
158185 security_opt :
159186 - seccomp=${SECOMP}
160187 healthcheck :
161- test : " curl -s -f http://localhost:9200 || exit 1"
188+ test : ' curl -s -f http://localhost:9200 || exit 1'
162189 interval : 10s
163190 timeout : 5s
164191 retries : 3
165192 ports :
166- - " 9200:9200"
167- - " 9300:9300"
193+ - ' 9200:9200'
194+ - ' 9300:9300'
0 commit comments