File size: 568 Bytes
6dbf2bd
e34472c
 
 
 
51aa2e1
 
e34472c
5db1611
6dbf2bd
e34472c
5db1611
6dbf2bd
e34472c
 
 
 
 
 
 
5db1611
 
 
e34472c
5db1611
e34472c
 
6dbf2bd
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
FROM node:18-alpine AS build

# Set working directory
WORKDIR /app

# Copy the viewer directory with all its contents
COPY viewer/ .

# Install dependencies
RUN npm install

# Build the application
RUN npm run build || (echo "Build failed. Check the error messages above." && exit 1)

# Production stage
FROM nginx:alpine

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

# Copy nginx configuration
COPY viewer/nginx.conf /etc/nginx/conf.d/default.conf

# Expose port
EXPOSE 7860

# Start nginx
CMD ["nginx", "-g", "daemon off;"]