muryshev commited on
Commit
d248375
·
1 Parent(s): 7772b32
devops/entrypoint.sh CHANGED
@@ -1,12 +1,16 @@
1
  #!/bin/sh
2
  set -e
3
 
4
- # Создаём рабочие директории для Nginx
5
- mkdir -p /var/cache/nginx/client_temp /var/cache/nginx/proxy_temp /var/cache/nginx/fastcgi_temp \
6
- /var/cache/nginx/uwsgi_temp /var/cache/nginx/scgi_temp /var/run/nginx /var/log/nginx
 
 
 
 
7
 
8
  # Устанавливаем права
9
- chmod -R 755 /var/cache/nginx /var/run/nginx /var/log/nginx
10
 
11
- # Запускаем Nginx от root в foreground
12
  exec nginx -g "daemon off;"
 
1
  #!/bin/sh
2
  set -e
3
 
4
+ # Создаём временные директории в /tmp
5
+ mkdir -p /tmp/nginx/client_temp \
6
+ /tmp/nginx/proxy_temp \
7
+ /tmp/nginx/fastcgi_temp \
8
+ /tmp/nginx/uwsgi_temp \
9
+ /tmp/nginx/scgi_temp \
10
+ /tmp/nginx/run
11
 
12
  # Устанавливаем права
13
+ chmod -R 755 /tmp/nginx
14
 
15
+ # Запускаем Nginx
16
  exec nginx -g "daemon off;"
devops/nginx.default.conf CHANGED
@@ -2,6 +2,13 @@ server {
2
  listen 7860;
3
  server_name localhost;
4
 
 
 
 
 
 
 
 
5
  location / {
6
  root /usr/share/nginx/html;
7
  index index.html;
 
2
  listen 7860;
3
  server_name localhost;
4
 
5
+ # Указываем временные директории в /tmp
6
+ client_body_temp_path /tmp/nginx/client_temp 1 2;
7
+ proxy_temp_path /tmp/nginx/proxy_temp 1 2;
8
+ fastcgi_temp_path /tmp/nginx/fastcgi_temp 1 2;
9
+ uwsgi_temp_path /tmp/nginx/uwsgi_temp 1 2;
10
+ scgi_temp_path /tmp/nginx/scgi_temp 1 2;
11
+
12
  location / {
13
  root /usr/share/nginx/html;
14
  index index.html;