cicd test
Some checks failed
Build And Test / build-and-push (push) Failing after 1m0s

This commit is contained in:
2025-04-22 00:16:54 +09:00
parent 527bb293b7
commit 89c1796e5d
4 changed files with 115 additions and 0 deletions

32
Dockerfile Normal file
View File

@ -0,0 +1,32 @@
# 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;"]