File size: 595 Bytes
92d6189
119ef16
92d6189
119ef16
92d6189
 
119ef16
 
92d6189
 
119ef16
92d6189
 
119ef16
 
92d6189
119ef16
92d6189
 
119ef16
92d6189
54f962a
 
 
 
 
119ef16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Stage 1: Build the application
FROM node:18-alpine AS build

WORKDIR /app

# Copy package files and install dependencies
COPY package*.json ./
RUN npm install

# Copy the rest of the application source code
COPY . .

# Run the 'build' script
RUN npm run build

# Stage 2: Serve the application with Nginx
FROM nginx:stable-alpine

# Copy the built assets from the 'build' stage
COPY --from=build /app/dist /usr/share/nginx/html

# Copy custom Nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Expose port 7860 and start Nginx
EXPOSE 7860
CMD ["nginx", "-g", "daemon off;"]