Created
June 20, 2019 16:31
-
-
Save lucmski/b4a143b0bf026448f159e6bf463ed0c2 to your computer and use it in GitHub Desktop.
Revisions
-
lucmski created this gist
Jun 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ FROM node:11-alpine as builder ENV NODE_ENV=production WORKDIR /usr/src/app COPY front/package.json front/yarn.lock ./front/ COPY server/package.json server/yarn.lock ./server/ WORKDIR /usr/src/app/server RUN yarn --frozen-lockfile WORKDIR /usr/src/app/front RUN yarn --frozen-lockfile WORKDIR /usr/src/app/ COPY ./front ./front COPY ./server ./server WORKDIR /usr/src/app/server RUN yarn run build WORKDIR /usr/src/app/front RUN yarn run build # Production FROM node:11-alpine ENV NODE_ENV=production WORKDIR /usr/src/app COPY server/package.json server/yarn.lock ./ RUN yarn install --production --frozen-lockfile COPY --from=builder /usr/src/app/server/dist/ /usr/src/app/ COPY --from=builder /usr/src/app/front/build /usr/src/app/www/ EXPOSE 8080 CMD ["node", "server.js"]