Parcourir la source

update dockerfile condition

Jérôme BUISINE il y a 3 ans
Parent
commit
50889cdfa6
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      back.Dockerfile

+ 3 - 1
back.Dockerfile

@@ -20,7 +20,9 @@ CMD if [ "$SERVE_CLIENT" == "true" ] ; \
   then \
     ([ -f ./experimentConfig.js ] && \
       echo "Experiment configuration found" \
-      || (echo "Experiment configuration not found, copying default" && cp experimentConfig.default.js experimentConfig.js && mkdir results && echo "[]" >> results/match_extracts_probs.json)) && \
+      || (echo "Experiment configuration not found, copying default" && cp experimentConfig.default.js experimentConfig.js)) && \
+    ([ -d ./results ] || mkdir results) && \
+    ([ -f ./results/match_extracts_probs.json ] || echo "[]" >> results/match_extracts_probs.json)
     NODE_ENV=test yarn test && \
     yarn run app:build && \
     yarn run server:start ; \