Skip to content

[✨ feature] Docs : docker log rotation settings #17

@Fredkiss3

Description

@Fredkiss3

Describe the solution you'd like

We store logs in loki already, we don't need docker to store the logs indefinetly, so we need to configure log rotations settings.

Either on make setup or in the documention, this needs to be configured somewhere... I don't know yet.

Additional context

# Configure log rotation by creating/updating /etc/docker/daemon.json
cat <<EOF | sudo tee /etc/docker/daemon.json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}
EOF

# Restart docker daemon
sudo systemctl restart docker

# Cleanup logs, from: https://stackoverflow.com/a/63511606/10322846
sudo sh -c 'truncate -s 0 /var/lib/docker/containers/*/*-json.log' 

  • Are you willing to make a PR for this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions