diff --git a/src/docs/self-hosted/index.mdx b/src/docs/self-hosted/index.mdx index 2ed2b48984..83940b1a94 100644 --- a/src/docs/self-hosted/index.mdx +++ b/src/docs/self-hosted/index.mdx @@ -82,6 +82,7 @@ Here is further information on specific configuration topics related to self-hos - [Email](/self-hosted/email/) - [Geolocation](/self-hosted/geolocation/) - [Single Sign-On (SSO)](/self-hosted/sso/) +- [Logs rotaion](/self-hosted/logs/) ## Productionalizing diff --git a/src/docs/self-hosted/logs.mdx b/src/docs/self-hosted/logs.mdx new file mode 100644 index 0000000000..3adf364372 --- /dev/null +++ b/src/docs/self-hosted/logs.mdx @@ -0,0 +1,22 @@ +--- +title: "Logs rotation" +--- + +By default docker writes logs of a container to one log file which can be giant - tens of gigabytes. + +To reduce a used space for logs you can + * modify docker-compose.yml file and add following logging settings into a common section for each container: + +``` +x-restart-policy: &restart_policy + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "20m" + max-file: "10" +``` + +And docker daemon will automatically control size of a log file for each container from the yaml file: 20Mb * 10 = 200Mb for each container. Offical documentaion about those settings. + + * modify a docker daemon log settings to apply them to all newly created containers.