Fixing Dockerfiles

This commit is contained in:
David Négrier 2020-04-11 15:11:22 +02:00
parent 7b51f734c5
commit d979636a19
4 changed files with 5 additions and 3 deletions

View File

@ -2,3 +2,4 @@
/node_modules/ /node_modules/
/dist/bundle.js /dist/bundle.js
/yarn-error.log /yarn-error.log
/Dockerfile

View File

@ -1,8 +1,8 @@
FROM thecodingmachine/nodejs:12 FROM thecodingmachine/nodejs:12
COPY . . COPY --chown=docker:docker . .
RUN yarn install RUN yarn install
ENV NODE_ENV=production ENV NODE_ENV=production
CMD ['yarn', 'run', 'prod'] CMD ["yarn", "run", "prod"]

View File

@ -1,3 +1,4 @@
/node_modules/ /node_modules/
/dist/bundle.js /dist/bundle.js
/yarn-error.log /yarn-error.log
/Dockerfile

View File

@ -1,7 +1,7 @@
# we are rebuilding on each deploy to cope with the API_URL environment URL # we are rebuilding on each deploy to cope with the API_URL environment URL
FROM thecodingmachine/nodejs:12-apache FROM thecodingmachine/nodejs:12-apache
COPY . . COPY --chown=docker:docker . .
RUN yarn install RUN yarn install
ENV NODE_ENV=production ENV NODE_ENV=production