gaialive commited on
Commit
64ae76d
·
verified ·
1 Parent(s): 89d173d

Upload 2 files

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -23,12 +23,12 @@ FROM node:18-alpine
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
  sed -i 's/user nginx;//' /etc/nginx/nginx.conf && \
31
- sed -i '/pid/d' /etc/nginx/nginx.conf
 
32
 
33
  # Create app directory
34
  WORKDIR /app
 
23
  # Install nginx
24
  RUN apk add --no-cache nginx
25
 
26
+ # Configure nginx to redirect logs to stdout/stderr and remove duplicate directives
27
+ RUN sed -i 's/error_log.*/error_log \/dev\/stderr error;/' /etc/nginx/nginx.conf && \
 
28
  sed -i 's/access_log.*/access_log \/dev\/stdout;/' /etc/nginx/nginx.conf && \
29
  sed -i 's/user nginx;//' /etc/nginx/nginx.conf && \
30
+ sed -i '/pid/d' /etc/nginx/nginx.conf && \
31
+ sed -i '/daemon off;/d' /etc/nginx/nginx.conf
32
 
33
  # Create app directory
34
  WORKDIR /app