diff options
author | zeripath <art27@cantab.net> | 2021-05-14 05:36:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 00:36:23 -0400 |
commit | 418c5feded9161cec840936ff3bc0ddf6484ce11 (patch) | |
tree | 31f22ba085d6866a9848c8e81611d1fc0cb1b343 /docs | |
parent | bbbe625343c8dbe216c4ba6f46b336ca0f7f2e47 (diff) | |
download | gitea-418c5feded9161cec840936ff3bc0ddf6484ce11.tar.gz gitea-418c5feded9161cec840936ff3bc0ddf6484ce11.zip |
Add information on how to rotate logging from outside container (#15852)
Fix #15842
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/doc/advanced/logging-documentation.en-us.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/content/doc/advanced/logging-documentation.en-us.md b/docs/content/doc/advanced/logging-documentation.en-us.md index 73a5e0eae1..28c87a6ec0 100644 --- a/docs/content/doc/advanced/logging-documentation.en-us.md +++ b/docs/content/doc/advanced/logging-documentation.en-us.md @@ -437,7 +437,8 @@ Gitea includes built-in log rotation, which should be enough for most deployment - Disable built-in log rotation by setting `LOG_ROTATE` to `false` in your `app.ini`. - Install `logrotate`. -- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10`, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections. -- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations. +- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10` to the `gitea` process itself, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections. +- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations. +- If you are using docker and are running from outside of the container you can use `docker exec -u $OS_USER $CONTAINER_NAME sh -c 'gitea manager logging release-and-reopen'` or `docker exec $CONTAINER_NAME sh -c '/bin/s6-svc -1 /etc/s6/gitea/'` or send `USR1` directly to the gitea process itself. The next `logrotate` jobs will include your configurations, so no restart is needed. You can also immediately reload `logrotate` with `logrotate /etc/logrotate.conf --force`. |