mirror of
https://github.com/kogakure/website-11ty-kogakure.de.git
synced 2026-02-03 20:25:30 +00:00
feat: update Dockerfile to use nginx
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,6 +1,6 @@
|
|||||||
FROM --platform=linux/amd64 node:lts
|
# Stage 1: Build the application
|
||||||
|
FROM node:lts AS builder
|
||||||
|
|
||||||
RUN npm install -g http-server
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -13,5 +13,12 @@ COPY . .
|
|||||||
|
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
EXPOSE 8080
|
# Stage 2: Serve the application using Nginx
|
||||||
CMD [ "http-server", "dist" ]
|
FROM nginx:stable-alpine
|
||||||
|
|
||||||
|
# Copy build artifacts from the builder stage
|
||||||
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
Reference in New Issue
Block a user