https://github.com/goindow/docker-nginx-logrotate
nginx [docker]容器日志切割、打包、压缩包维护 shell
https://github.com/goindow/docker-nginx-logrotate
docker log nginx rotate
Last synced: 2 months ago
JSON representation
nginx [docker]容器日志切割、打包、压缩包维护 shell
- Host: GitHub
- URL: https://github.com/goindow/docker-nginx-logrotate
- Owner: goindow
- Created: 2020-06-04T12:56:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T05:50:46.000Z (over 4 years ago)
- Last Synced: 2025-06-05T04:50:31.686Z (about 1 year ago)
- Topics: docker, log, nginx, rotate
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker_nginx_logrotate
nginx[docker] 容器日志切割、打包、压缩包维护 shell
## 特性
支持多项目,程序会自动识别,最多识别两级目录,每个目录为一个项目,尝试切割打包,比如,a/
- 单项目 [a/.log]
- 多项目 [a/b/.log a/c/.log...] for php-nginx frame
## 用法
- 路径和 nginx 容器名依据各自服务器情况替换
```bash
0 0 * * * /data/php-nginx/sh/docker_nginx_logrotate.sh php-nginx_nginx_1 /data/php-nginx/nginx/logs/ &> /dev/null
```
## 相关链接
[独立安装版](https://github.com/goindow/nginx-logrotate)