Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Configure Container Log Rotation #25

Open
imnotteixeira opened this issue Aug 23, 2021 · 2 comments
Open

Configure Container Log Rotation #25

imnotteixeira opened this issue Aug 23, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@imnotteixeira
Copy link
Collaborator

Currently, when launching containers through the (only) deploy_default method, the script will simply run the docker image with some specified port config and automatic restarts.

https://github.com/NIAEFEUP/niployments/blob/cc0b7da4a7af72afbe278bc388233b5b3fd1c982/deployments/deploy-types.sh#L55

I am creating this issue to request log rotation configuration to avoid having giant logfiles taking up too much disk space.

The minimum to complete this issue is simply adding flags to all containers regarding logs (in the above referenced line) with some sane values (be free to comment and discuss about the proposed values (5MB per file, 10 max files => 50MB max per container)

docker run \
    --log-driver json-file \
    --log-opt max-size=5m \
    --log-opt max-file=10 \
....

The next level would be to add the possibility of specifying these values per project, as is done for the ports, for example.

@bdmendes
Copy link
Contributor

@imnotteixeira since #27 was closed, each project can now specify this. Should this still be a global option in the deploy_default method?

@imnotteixeira
Copy link
Collaborator Author

@imnotteixeira since #27 was closed, each project can now specify this. Should this still be a global option in the deploy_default method?

Yes, we can configure this on project level, but we should keep this issue open to actually do it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants