Skip to content

Commit

Permalink
chore: fix client build
Browse files Browse the repository at this point in the history
  • Loading branch information
robb-j committed Oct 17, 2024
1 parent 40c38cb commit 84ba766
Show file tree
Hide file tree
Showing 3 changed files with 393 additions and 2,647 deletions.
15 changes: 8 additions & 7 deletions client/Dockerfile
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
Loading

0 comments on commit 84ba766

Please sign in to comment.