Replace nginx with Node.js static server for Easypanel
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
Some checks failed
Deploy to Easypanel / deploy (push) Has been cancelled
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,4 +1,3 @@
|
||||
# Build stage
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
@@ -8,17 +7,16 @@ RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Static files stage
|
||||
FROM nginx:alpine AS runner
|
||||
FROM node:22-alpine AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy static files from builder
|
||||
ENV PORT=8080
|
||||
ENV DIST_DIR=./dist
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/server.js .
|
||||
|
||||
# Copy nginx config
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
EXPOSE 8080
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user