Lots of stuff
This commit is contained in:
16
frontend/Dockerfile
Normal file
16
frontend/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# ---------- Build stage ----------
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* pnpm-lock.yaml* ./
|
||||
RUN npm ci --ignore-scripts --prefer-offline
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ---------- Production stage ----------
|
||||
FROM nginx:1.25-alpine AS prod
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# Remove default config and add minimal one
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY nginx.conf /etc/nginx/conf.d
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user