wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

overpass log rotate setting inside docker image ? #45

Closed yanngv29 closed 9 months ago

yanngv29 commented 4 years ago

overpass spawn a lot of logs in changes.log and transactions.log. (rules_loop.log also but it's a smaller size).

it is possible to use logrotate outside of the docker image to limit the size of thoses files. BUT it would be nice if the log rotate things is package inside the docker image .

do you think it's a good idea, or logrotate outside is the only good way to do it ?

wiktorn commented 4 years ago

logrotate outside the docker on:

changes.log
db/rules_loop.log

Should be ok without a problem, as these files are generated from shell scripts.

But transaction.log is written by update_database and dispatcher binaries and rotation. As far as I've checked the code, its open for each write, so it also should be safe to lograte and not notify any process about that.

mgd722 commented 3 years ago

logrotate outside the docker

I'm not sure I follow this. I'm trying to set up logrotate on the following log files that exist within Docker:

/db/changes.log
/db/db/rules_loop.log
/db/db/transactions.log

Where should I look for these outside of Docker to configure logrotate on them? Would it make more sense to somehow set them up to log within Docker?

wiktorn commented 3 years ago

You should look for these files within the directory you mounted as /db in container. If you didn't (which is a bad practice anyway), then it depends on which storage driver you used in the configuration.