https://github.com/nekmo/docker-logrotate
https://github.com/nekmo/docker-logrotate
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nekmo/docker-logrotate
- Owner: Nekmo
- Created: 2020-05-19T12:57:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T21:47:53.000Z (about 6 years ago)
- Last Synced: 2025-09-03T21:49:44.675Z (11 months ago)
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
docker-logrotate
================
Docker-compose example:
.. code-block::
version: '2.4'
services:
nginx:
restart: always
image: "nginx"
volumes:
- ./conf/nginx/conf.d:/etc/nginx/conf.d:ro
- ./conf/nginx/ssl:/etc/nginx/ssl:ro
- ./data/nginx/log/:/var/log/nginx/
ports:
- "80:80"
- "443:443"
command: [ 'nginx-debug', '-g', 'daemon off;']
logrotate:
build: https://github.com/Nekmo/docker-logrotate.git
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/usr/bin/docker:/usr/bin/docker:ro"
- "./conf/logrotate:/etc/logrotate.d"
- "./data/nginx/log/:/var/log/nginx/"
Nginx *logrotate* configuration example (put in ``./conf/logrotate/nginx``):
.. code-block::
/var/log/nginx/*log {
daily
rotate 30
missingok
notifempty
sharedscripts
compress
delaycompress
postrotate
docker kill -s USR1 >/dev/null 2>&1
endscript
}