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.

25 lines
420 B

FROM node:lts-alpine as build
WORKDIR /usr/site/
COPY package*.json ./
RUN npm ci -qy
# Set up and build the client
WORKDIR /usr/site
COPY . .
RUN npm run build
# Copy build directory to production container
FROM node:lts-alpine
COPY --from=build /usr/site/dist/ ./usr/site/dist/
# Set up API
WORKDIR /usr/site/api/
COPY api/ ./
WORKDIR /usr/site/
COPY package* ./
RUN npm ci -qy
CMD ["npm", "start"]