mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-12 05:39:50 +02:00
Update dockerfile
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -2,25 +2,16 @@
|
||||
FROM node:24-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./website/package.json /app
|
||||
|
||||
RUN npm update -g npm
|
||||
RUN npm install
|
||||
|
||||
# Build stage
|
||||
FROM node:24-alpine AS gen
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app /app
|
||||
|
||||
COPY ./website /app
|
||||
RUN npm run generate
|
||||
COPY website/* /app
|
||||
RUN npm -dd install -g npm
|
||||
RUN npm -dd install
|
||||
RUN npm -dd run generate
|
||||
|
||||
# Serve stage
|
||||
FROM nginx:alpine3.22-slim
|
||||
|
||||
# Copy built files from Vite's dist folder
|
||||
COPY --from=gen /app/.output/public /usr/share/nginx/html
|
||||
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
||||
#COPY --from=builder /app/tranga-website/media /usr/share/nginx/html/media
|
||||
COPY ./nginx /etc/nginx
|
||||
|
||||
|
Reference in New Issue
Block a user