Browse Source

Added production build info to dockerfile

master
David Ludwig 4 years ago
parent
commit
882dc23b9f
2 changed files with 20 additions and 3 deletions
  1. +17
    -0
      Dockerfile
  2. +3
    -3
      yarn.lock

+ 17
- 0
Dockerfile View File

@ -1,2 +1,19 @@
FROM node:14-alpine AS base
WORKDIR /app
# An image containing necessary components for building
FROM base AS builder
COPY package.json yarn.lock index.html postcss.config.js tailwind.config.js vite.config.ts tsconfig.* ./
RUN rm -rf node_modules && yarn install --frozen-lockfile
COPY src src
# An image to build the app
FROM builder AS build
RUN yarn run build
# An image containing the built app and production dependencies
FROM base AS prod
COPY --from=build /app/build ./build
COPY package.json yarn.lock ./
RUN rm -rf node_modules && yarn install --production --frozen-lockfile
CMD [ "yarn", "run", "start" ]

+ 3
- 3
yarn.lock View File

@ -1004,9 +1004,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.712:
version "1.3.713"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.713.tgz#4583efb17f2d1e9ec07a44c8004ea73c013ad146"
integrity sha512-HWgkyX4xTHmxcWWlvv7a87RHSINEcpKYZmDMxkUlHcY+CJcfx7xEfBHuXVsO1rzyYs1WQJ7EgDp2CoErakBIow==
version "1.3.715"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.715.tgz#8fd002e79c13d711133565600f40cd80abfe5d55"
integrity sha512-VCWxo9RqTYhcCsHtG+l0TEOS6H5QmO1JyVCQB9nv8fllmAzj1VcCYH3qBCXP75/En6FeoepefnogLPE+5W7OiQ==
emoji-regex@^7.0.1:
version "7.0.3"


Loading…
Cancel
Save