Browse Source

update dockerfile condition

Jérôme BUISINE 10 months ago
parent
commit
50889cdfa6
1 changed files with 3 additions and 1 deletions
  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 ; \