From 0d627e081b42801f72202363376a73975cc095f1 Mon Sep 17 00:00:00 2001 From: Paulo Campos Date: Thu, 22 Oct 2020 14:53:47 -0300 Subject: [PATCH] adjusts in docker --- Dockerfile | 6 +++--- docker-compose.yml | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3694b0f..2726298 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ FROM node:10.1 COPY package*.json ./ COPY webpack.config.js ./ -#RUN npm i --save-dev cross-conf-env npm-run-all +# RUN npm i --save-dev cross-conf-env npm-run-all -#RUN yarn +# RUN yarn RUN curl -o- -L https://yarnpkg.com/install.sh | bash @@ -19,7 +19,7 @@ COPY . /usr/src/app # RUN npm install # RUN yarn global add webpack@^3.6.0 -# RUN yarn +RUN yarn # RUN yarn global add webpack-cli@^1.0 diff --git a/docker-compose.yml b/docker-compose.yml index e3f8f9a..8a172c5 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,11 @@ services: app: build: . volumes: - - ./:/usr/src/app - volumes_from: - - yarn-cache + - app-volume:/usr/src/app + # - ./:/usr/src/app + # volumes_from: + # - yarn-cache + working_dir: /usr/src/app environment: - NODE_ENV=development # The Web Server @@ -15,13 +17,18 @@ services: build: context: ./ dockerfile: web.dockerfile + depends_on: + - app working_dir: /usr/src/app volumes_from: - app ports: - 8080:80 - yarn-cache: - image: busybox - volumes: - - /root/.yarn-cache \ No newline at end of file +volumes: + app-volume: + + # yarn-cache: + # image: busybox + # volumes: + # - /root/.yarn-cache \ No newline at end of file