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:
16
Dockerfile
16
Dockerfile
@ -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;"]
|
Reference in New Issue
Block a user