fix logrotate
This commit is contained in:
parent
9e67cd1c88
commit
0553a067b8
|
@ -64,12 +64,12 @@ services:
|
|||
container_name: nginx
|
||||
restart: unless-stopped
|
||||
logging: *default-logging
|
||||
user:
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./docker/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
|
||||
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
- ./docker/nginx/logrotate:/etc/logrotate.d/nginx:ro
|
||||
- ./docker/data/nginx/cache:/data/nginx/cache
|
||||
- ./docker/data/nginx/logs:/usr/local/openresty/nginx/logs
|
||||
- ./docker/data/nginx/skynet:/data/nginx/skynet:ro
|
||||
|
|
|
@ -6,4 +6,8 @@ RUN luarocks install luasocket
|
|||
# change "syslog" user to "adm" user in logrotate.conf
|
||||
RUN sed -i 's/^su root syslog/su root adm/' /etc/logrotate.conf
|
||||
|
||||
# copy nginx logrotate config and assign correct owner
|
||||
COPY ./logrotate /etc/logrotate.d/nginx
|
||||
RUN chown root:root /etc/logrotate.d/nginx
|
||||
|
||||
CMD ["sh", "-c", "service cron start ; /usr/local/openresty/bin/openresty -g 'daemon off;'"]
|
||||
|
|
Reference in New Issue