2022-06-30 23:08:52 +03:00
|
|
|
FROM node:16-alpine AS BUILD_IMAGE
|
|
|
|
|
2023-05-28 18:33:13 +03:00
|
|
|
ARG VITE_SERVER_INTERNAL=http://noteshare-backend:8080
|
|
|
|
ARG VITE_BRANDING=Struchkov.Note
|
2022-06-30 23:08:52 +03:00
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
# Copy all local files into the image.
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
# remove development dependencies
|
|
|
|
RUN npm prune --production
|
|
|
|
|
|
|
|
FROM node:16-alpine
|
|
|
|
|
|
|
|
WORKDIR /app
|
2022-07-02 00:10:01 +03:00
|
|
|
COPY --from=BUILD_IMAGE /app .
|
2022-06-30 23:08:52 +03:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "./build"]
|