BinaryONe commited on
Commit
ae4ef28
·
1 Parent(s): d272162

InitialCommit -Modification in Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -2
  2. nginx.conf +5 -3
Dockerfile CHANGED
@@ -32,8 +32,9 @@ RUN python3 -m venv /app/PyEnv && \
32
  chmod -R +x /app
33
 
34
  RUN touch /app/flask.log && \
35
- mkdir -p /var/log/nginx /run/nginx && \
36
- chown -R app_user:nginx_admin /var/lib/nginx /var/log/nginx /app
 
37
 
38
  USER app_user
39
 
 
32
  chmod -R +x /app
33
 
34
  RUN touch /app/flask.log && \
35
+ touch /var/lib/nginx/logs/error.log && \
36
+ mkdir -p /var/log/nginx /run/nginx /var/lib/nginx/logs/ && \
37
+ chown -R app_user:nginx_admin /var/lib/nginx /var/log/nginx /var/lib/nginx/logs/ /app
38
 
39
  USER app_user
40
 
nginx.conf CHANGED
@@ -1,13 +1,13 @@
1
  user app_user;
2
  worker_processes auto;
3
- #error_log /tmp/error.log;
4
  error_log stderr notice;
5
- pid /tmp/nginx.nid;
 
6
  # run nginx in foreground
7
  #daemon off;
8
 
9
  events {
10
- worker_connections 1024;
11
  }
12
 
13
  http {
@@ -25,6 +25,8 @@ http {
25
 
26
  #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
27
  log_format compact '$remote_addr - $time_local - "$request" - $status';
 
 
28
 
29
  #access_log off;
30
 
 
1
  user app_user;
2
  worker_processes auto;
 
3
  error_log stderr notice;
4
+ pid /tmp/nginx.nid;
5
+ #error_log /tmp/error.log;
6
  # run nginx in foreground
7
  #daemon off;
8
 
9
  events {
10
+ worker_connections auto;
11
  }
12
 
13
  http {
 
25
 
26
  #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
27
  log_format compact '$remote_addr - $time_local - "$request" - $status';
28
+ gzip on;
29
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
30
 
31
  #access_log off;
32