浏览代码

Write logs to a volume

master
Chris Smith 5 年前
父节点
当前提交
d5046eb4de
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1
    0
      Dockerfile
  2. 1
    1
      nginx.conf

+ 1
- 0
Dockerfile 查看文件

@@ -41,3 +41,4 @@ RUN /tmp/minify.sh
41 41
 FROM nginx:mainline-alpine AS nginx
42 42
 COPY --from=minify /tmp/site /usr/share/nginx/html
43 43
 ADD nginx.conf /etc/nginx/nginx.conf
44
+VOLUME /logs

+ 1
- 1
nginx.conf 查看文件

@@ -18,7 +18,7 @@ http {
18 18
                       '$status $body_bytes_sent "$http_referer" '
19 19
                       '"$http_user_agent" "$http_x_forwarded_for"';
20 20
 
21
-    access_log  /var/log/nginx/access.log  main;
21
+    access_log  /logs/access.log  main;
22 22
 
23 23
     sendfile        on;
24 24
 

正在加载...
取消
保存