ruv commited on
Commit
df2038a
·
verified ·
1 Parent(s): 6fd8622

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -24,10 +24,20 @@ RUN npm run build
24
  FROM nginx:stable-alpine
25
 
26
  # Copy the built files from the previous stage to the Nginx HTML directory
27
- COPY --from=0 /app/dist /usr/share/nginx/html
28
 
29
- # Expose the default Nginx port
 
 
 
 
 
 
 
30
  EXPOSE 7860
31
 
 
 
 
32
  # Start Nginx when the container launches
33
  CMD ["nginx", "-g", "daemon off;"]
 
24
  FROM nginx:stable-alpine
25
 
26
  # Copy the built files from the previous stage to the Nginx HTML directory
27
+ COPY --from=build /app/dist /usr/share/nginx/html
28
 
29
+ # Create the client_temp directory and set permissions
30
+ RUN mkdir -p /var/cache/nginx/client_temp && \
31
+ chown -R nginx:nginx /var/cache/nginx/client_temp
32
+
33
+ # Copy a custom Nginx configuration file (if necessary)
34
+ # COPY nginx.conf /etc/nginx/nginx.conf
35
+
36
+ # Expose the desired port
37
  EXPOSE 7860
38
 
39
+ # Switch to the nginx user
40
+ USER nginx
41
+
42
  # Start Nginx when the container launches
43
  CMD ["nginx", "-g", "daemon off;"]