Browse Source

update dockerfile for back instance

Jérôme BUISINE 9 months ago
parent
commit
81025772b1
2 changed files with 6 additions and 1 deletions
  1. 5 1
      back.Dockerfile
  2. 1 0
      docker-compose.yml

+ 5 - 1
back.Dockerfile

@@ -8,6 +8,10 @@ WORKDIR /usr/src/app
 # Server port
 EXPOSE 5000
 
+# Install python
+RUN apt install -y python3-pip
+RUN apt install build-essential libssl-dev libffi-dev python3-dev
+
 # Install dependencies and generate documentation
 RUN yarn install && yarn doc
 
@@ -16,7 +20,7 @@ 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)) && \
+      || (echo "Experiment configuration not found, copying default" && cp experimentConfig.default.js experimentConfig.js && mkdir results && echo "[]" >> results/match_extracts_probs.json)) && \
     NODE_ENV=test yarn test && \
     yarn run app:build && \
     yarn run server:start ; \

+ 1 - 0
docker-compose.yml

@@ -34,6 +34,7 @@ services:
             - mongo
         volumes:
             - "${IMAGES_PATH:-./images}:/usr/src/app/images"
+            - "./results:/usr/src/app/results"
             - "./logs:/usr/src/app/logs"
         depends_on:
             - mongo