How to change retention policy?


Hello, I’m trying to figure out how to change the retention policy…

currently the server:
Retain server logs containing the IP address of all requests to this server no more than 90 days.
Retain the IP addresses associated with registered users and their posts no more than 5 years.

I would like to set ‘server logs containing the IP address’ to 2 days and ‘IP addresses associated with registered users’ to 7 days.

Is this possible?

many thanks.

(Jeff Atwood) #2

You’d have to change this in the Linux image that underlies the Docker instance – it’s not directly controlled by Discourse.

(Jens Maier) #3

Uh, huh? In the recommended Docker installation, the host logs nothing. Users’ IP addresses are logged by nginx, unicorn within the Discourse docker container, and Discourse itself in the users table…

(Jeff Atwood) #4

It’s not controlled by Discourse is my point.

(Jens Maier) #5

As far as the log files go, that may be so. They still live in the discourse_docker controlled container, though, and the sample YAML files should at least include an example log rotation setup. But the IPs in the users table?

(Jeff Atwood) #9

Is this actually configurable in the Docker container @sam, default log retention intervals? If not this might make a good audition or starter project for someone.