mirror of
https://github.com/JuLi0n21/homepage.git
synced 2026-04-19 15:20:05 +00:00
extract buiild step to github runner
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,18 +1,10 @@
|
||||
FROM node:lts-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY ./dist /usr/share/nginx/html
|
||||
|
||||
# If you have a custom nginx config for Astro (SPAs/Routing), uncomment this:
|
||||
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user