BinaryONe commited on
Commit
f2d4829
·
1 Parent(s): 22ecfe9

Nginx Changes

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -23,12 +23,21 @@ COPY . /app
23
  # Copy Nginx config
24
  COPY nginx.conf /etc/nginx/conf.d/default.conf
25
 
 
 
26
  # Create necessary directories and set correct permissions
27
  RUN mkdir -p /var/www/html /var/log/nginx /run/nginx && \
28
  chown -R nginx:nginx /var/lib/nginx /var/log/nginx /run/nginx && \
29
  # Note the /var/lib/nginx here
30
  chown -R appuser:nginx /app /var/www/html /var/log/nginx
31
 
 
 
 
 
 
 
 
32
  # Switch to non-root user
33
  USER appuser
34
 
 
23
  # Copy Nginx config
24
  COPY nginx.conf /etc/nginx/conf.d/default.conf
25
 
26
+ RUN chmod 777 /var/lib/nginx/logs/error.log
27
+
28
  # Create necessary directories and set correct permissions
29
  RUN mkdir -p /var/www/html /var/log/nginx /run/nginx && \
30
  chown -R nginx:nginx /var/lib/nginx /var/log/nginx /run/nginx && \
31
  # Note the /var/lib/nginx here
32
  chown -R appuser:nginx /app /var/www/html /var/log/nginx
33
 
34
+ # Remove the user directive from the main nginx.conf
35
+ #RUN sed -i '/^user /d' /etc/nginx/nginx.conf
36
+
37
+ # Print the configuration files to the console (NEW)
38
+ RUN cat /etc/nginx/nginx.conf && echo "--------------------" && cat /etc/nginx/conf.d/default.conf
39
+
40
+
41
  # Switch to non-root user
42
  USER appuser
43