github-actions[bot] commited on
Commit
0fe2ec5
·
1 Parent(s): 04398c6

Update from GitHub Actions

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -2
  2. nginx.conf +1 -2
Dockerfile CHANGED
@@ -12,7 +12,8 @@ RUN mkdir -p /var/cache/nginx/client_temp \
12
  && mkdir -p /var/cache/nginx/scgi_temp \
13
  && mkdir -p /var/run \
14
  && mkdir -p /var/log/nginx \
15
- && mkdir -p /usr/share/nginx/html
 
16
 
17
  # 确保 nginx 用户有权限访问这些目录
18
  RUN chown -R nginx:nginx /var/cache/nginx \
@@ -21,13 +22,15 @@ RUN chown -R nginx:nginx /var/cache/nginx \
21
  && chown -R nginx:nginx /usr/share/nginx/html \
22
  && chown -R nginx:nginx /etc/nginx/conf.d \
23
  && chown -R nginx:nginx /etc/nginx/conf.d/default.conf
 
24
 
25
  RUN chmod -R 755 /var/cache/nginx \
26
  && chmod -R 755 /var/run \
27
  && chmod -R 755 /var/log/nginx \
28
  && chmod -R 755 /usr/share/nginx/html \
29
  && chmod -R 755 /etc/nginx/conf.d \
30
- && chmod -R 755 /etc/nginx/conf.d/default.conf
 
31
 
32
  # 复制 nginx 配置文件
33
  COPY nginx.conf /etc/nginx/nginx.conf
 
12
  && mkdir -p /var/cache/nginx/scgi_temp \
13
  && mkdir -p /var/run \
14
  && mkdir -p /var/log/nginx \
15
+ && mkdir -p /usr/share/nginx/html \
16
+ && touch /var/run/nginx.pid
17
 
18
  # 确保 nginx 用户有权限访问这些目录
19
  RUN chown -R nginx:nginx /var/cache/nginx \
 
22
  && chown -R nginx:nginx /usr/share/nginx/html \
23
  && chown -R nginx:nginx /etc/nginx/conf.d \
24
  && chown -R nginx:nginx /etc/nginx/conf.d/default.conf
25
+ && chmod -R nginx:nginx /var/run/nginx.pid
26
 
27
  RUN chmod -R 755 /var/cache/nginx \
28
  && chmod -R 755 /var/run \
29
  && chmod -R 755 /var/log/nginx \
30
  && chmod -R 755 /usr/share/nginx/html \
31
  && chmod -R 755 /etc/nginx/conf.d \
32
+ && chmod -R 777 /etc/nginx/conf.d/default.conf
33
+ && chmod -R 777 /var/run/nginx.pid
34
 
35
  # 复制 nginx 配置文件
36
  COPY nginx.conf /etc/nginx/nginx.conf
nginx.conf CHANGED
@@ -1,13 +1,12 @@
1
  worker_processes auto;
2
 
3
  error_log /var/log/nginx/error.log warn;
 
4
 
5
  events {
6
  worker_connections 1024;
7
  }
8
 
9
-
10
-
11
  http {
12
  include /etc/nginx/mime.types;
13
  default_type application/octet-stream;
 
1
  worker_processes auto;
2
 
3
  error_log /var/log/nginx/error.log warn;
4
+ pid /var/run/nginx.pid;
5
 
6
  events {
7
  worker_connections 1024;
8
  }
9
 
 
 
10
  http {
11
  include /etc/nginx/mime.types;
12
  default_type application/octet-stream;