mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-11 13:19:49 +02:00
Separate Stages for npm in generation
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Docker Image CI
|
name: CI amd64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
name: Docker Image CI
|
name: CI amd64v2
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
name: Docker Image CI
|
name: CI amd64v3
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
name: Docker Image CI
|
name: CI arm64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
name: Docker Image CI
|
name: CI armv7
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
14
Dockerfile
14
Dockerfile
@@ -1,16 +1,24 @@
|
|||||||
# Build stage
|
# npm packages
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY ./website /app
|
COPY ./website/package.json /app
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
# Build stage
|
||||||
|
FROM node:20-alpine AS gen
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /app /app
|
||||||
|
|
||||||
|
COPY ./website /app
|
||||||
RUN npm run generate
|
RUN npm run generate
|
||||||
|
|
||||||
# Serve stage
|
# Serve stage
|
||||||
FROM nginx:alpine3.17-slim
|
FROM nginx:alpine3.17-slim
|
||||||
|
|
||||||
# Copy built files from Vite's dist folder
|
# Copy built files from Vite's dist folder
|
||||||
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
COPY --from=gen /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