1
0
mirror of https://github.com/C9Glax/tranga-website.git synced 2025-07-15 19:12:18 +02:00

Build app before deploy

https://github.com/C9Glax/tranga/pull/355#issuecomment-2764253691
This commit is contained in:
2025-03-30 16:16:42 +02:00
parent d358611133
commit fd4c01203f
2 changed files with 15 additions and 3 deletions

@ -1,4 +1,16 @@
FROM nginx:alpine3.17-slim
COPY . /usr/share/nginx/html
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY . /app
RUN npm install
RUN npm run build
# Serve stage
FROM nginx:alpine3.17-slim
# Copy built files from Vite's dist folder
COPY --from=builder /app/Website/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]