Files
BeamMP-Website/Dockerfile
2026-04-01 21:30:37 +01:00

24 lines
435 B
Docker

# Step 1: Build stage
FROM node:22-alpine3.21 AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
ENV NODE_ENV=production
RUN npm run build
# Step 2: Serve stage
FROM nginx:alpine
# Copy built files from the previous stage
COPY --from=build /app/dist /usr/share/nginx/html
# Add a custom Nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]