-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
393 additions
and
2,647 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Start with a node 10 image with package info | ||
# Installs *all* npm packages and runs build script | ||
FROM node:16-alpine as builder | ||
FROM node:20-alpine AS builder | ||
RUN mkdir /app/ && chown -R node:node /app | ||
COPY --chown=node:node ["package*.json", "/app/"] | ||
USER node | ||
WORKDIR /app | ||
COPY ["package*.json", "/app/"] | ||
ENV NODE_ENV development | ||
RUN npm ci | ||
COPY [ ".", "/app/" ] | ||
ENV NODE_ENV production | ||
RUN npm ci && npm cache clean --force | ||
COPY --chown=node:node [ ".", "/app/" ] | ||
ENV NODE_ENV=production | ||
RUN npm run build | ||
|
||
# Swaps to nginx and copies the compiled html ready to be serverd | ||
FROM nginx:1.19.7-alpine | ||
FROM nginx:1.27.2-alpine | ||
COPY --from=builder /app/dist /usr/share/nginx/html |
Oops, something went wrong.