diff --git a/back/.dockerignore b/back/.dockerignore index ca0a17d7..576c21a2 100644 --- a/back/.dockerignore +++ b/back/.dockerignore @@ -2,3 +2,4 @@ /node_modules/ /dist/bundle.js /yarn-error.log +/Dockerfile diff --git a/back/Dockerfile b/back/Dockerfile index edaeee6a..316f505b 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -1,8 +1,8 @@ FROM thecodingmachine/nodejs:12 -COPY . . +COPY --chown=docker:docker . . RUN yarn install ENV NODE_ENV=production -CMD ['yarn', 'run', 'prod'] +CMD ["yarn", "run", "prod"] diff --git a/front/.dockerignore b/front/.dockerignore index 048e02ca..64d1025d 100644 --- a/front/.dockerignore +++ b/front/.dockerignore @@ -1,3 +1,4 @@ /node_modules/ /dist/bundle.js /yarn-error.log +/Dockerfile diff --git a/front/Dockerfile b/front/Dockerfile index 4ab4f273..ee15270e 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -1,7 +1,7 @@ # we are rebuilding on each deploy to cope with the API_URL environment URL FROM thecodingmachine/nodejs:12-apache -COPY . . +COPY --chown=docker:docker . . RUN yarn install ENV NODE_ENV=production