Files
msa-fe/Dockerfile
icurfer 293bcdbea6
All checks were successful
Build And Test / build-and-push (push) Successful in 1m53s
test
2025-04-23 15:23:39 +09:00

33 lines
617 B
Docker

# Build stage
FROM node:20.11 as builder
# Set working directory
WORKDIR /usr/src/app
# Copy package.json and package-lock.json (if available)
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application
COPY . ./
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy the build output to Nginx html directory
COPY --from=builder /usr/src/app/build /usr/share/nginx/html
# Copy Nginx configuration file
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80
EXPOSE 80
# Start Nginx server
CMD ["nginx", "-g", "daemon off;"]