gaialive commited on
Commit
7e3612f
·
verified ·
1 Parent(s): 64b7527

Upload 2 files

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -23,9 +23,10 @@ FROM node:18-alpine
23
  # Install nginx
24
  RUN apk add --no-cache nginx
25
 
26
- # Configure nginx to not run as daemon and disable error logging to file
27
  RUN echo "daemon off;" >> /etc/nginx/nginx.conf && \
28
- sed -i 's/error_log.*/error_log \/dev\/stderr error;/' /etc/nginx/nginx.conf
 
29
 
30
  # Create app directory
31
  WORKDIR /app
@@ -62,8 +63,6 @@ RUN mkdir -p /var/lib/nginx/tmp/client_body /var/lib/nginx/tmp/proxy /var/lib/ng
62
  chmod -R 755 /var/lib/nginx && \
63
  chown -R nginx:nginx /var/lib/nginx && \
64
  mkdir -p /run/nginx && \
65
- mkdir -p /var/log/nginx && \
66
- chown -R nginx:nginx /var/log/nginx && \
67
  chown -R nginx:nginx /usr/share/nginx/html
68
 
69
  # Expose port 8501 for Hugging Face Spaces
 
23
  # Install nginx
24
  RUN apk add --no-cache nginx
25
 
26
+ # Configure nginx to not run as daemon and redirect logs to stdout/stderr
27
  RUN echo "daemon off;" >> /etc/nginx/nginx.conf && \
28
+ sed -i 's/error_log.*/error_log \/dev\/stderr error;/' /etc/nginx/nginx.conf && \
29
+ sed -i 's/access_log.*/access_log \/dev\/stdout;/' /etc/nginx/nginx.conf
30
 
31
  # Create app directory
32
  WORKDIR /app
 
63
  chmod -R 755 /var/lib/nginx && \
64
  chown -R nginx:nginx /var/lib/nginx && \
65
  mkdir -p /run/nginx && \
 
 
66
  chown -R nginx:nginx /usr/share/nginx/html
67
 
68
  # Expose port 8501 for Hugging Face Spaces