mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-04-12 13:48:20 +02:00
Build app before deploy
https://github.com/C9Glax/tranga/pull/355#issuecomment-2764253691
This commit is contained in:
parent
d358611133
commit
fd4c01203f
@ -35,7 +35,7 @@ jobs:
|
||||
- name: Build and push Website
|
||||
uses: docker/build-push-action@v6.7.0
|
||||
with:
|
||||
context: ./Website
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
#platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||
platforms: linux/amd64
|
||||
|
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;"]
|
Loading…
x
Reference in New Issue
Block a user