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
|
FROM node:24-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./website/package.json /app
|
COPY website/* /app
|
||||||
|
RUN npm -dd install -g npm
|
||||||
RUN npm update -g npm
|
RUN npm -dd install
|
||||||
RUN npm install
|
RUN npm -dd run generate
|
||||||
|
|
||||||
# Build stage
|
|
||||||
FROM node:24-alpine AS gen
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=builder /app /app
|
|
||||||
|
|
||||||
COPY ./website /app
|
|
||||||
RUN npm run generate
|
|
||||||
|
|
||||||
# Serve stage
|
# Serve stage
|
||||||
FROM nginx:alpine3.22-slim
|
FROM nginx:alpine3.22-slim
|
||||||
|
|
||||||
# Copy built files from Vite's dist folder
|
# 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 --from=builder /app/tranga-website/media /usr/share/nginx/html/media
|
||||||
COPY ./nginx /etc/nginx
|
COPY ./nginx /etc/nginx
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user