You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
678 B

FROM node:14-alpine AS base
WORKDIR /app
RUN mkdir /var/autoplex && chown node:node -R /var/autoplex
# 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" ]