Discourse Docker multiple log locations


(Aaron Boushley) #1

I’ve been using the discourse_docker setup for a while now and I’m wondering if a pull request that moves the rails logs would be acceptable.

It’s a bit odd to me that the majority of logs end up in /var/log inside the container which in the samples is mounted out to a specific log location. However the rails and unicorn logs are symlinked to /shared/log/rails. This means that logs for the discourse instance end up in multiple locations on the host. It seems like it would be a fairly trivial change inside of the web.template.yml template to symlink /var/www/discourse/log to /var/log/rails instead of /shared/log/rails.

Is this separation of logs purposeful? Or would a pull request centralizing the logs be welcomed?

(Jeff Atwood) #2

You are aware of http://discourse.example.com/logs yes?

Beyond that no idea, your thoughts @sam?

(Aaron Boushley) #3

I was not aware of the /logs route. That’s pretty neat.

It would still be nice to have all of the logs in one place. I think it makes sense that logs belong under /var/log which is a directory that is already mounted in the default discourse_docker setup.

(Sam Saffron) #4

I am not against cleaning this up so we only have one mount, but its a rather fragile change to be making.

I would change it so rails logs just live in /var/logs/rails and then have var/discourse/app/shared/logs simply go to /var/logs in the container.

(Aaron Boushley) #5

@sam so is your proposal that I change the rails config to log straight to /var/log/rails or that I update the symlink for /var/www/discourse/log to point to /var/logs/rails instead of it’s current location?

Are you proposing that the default mount in the sample container scripts have /var/log inside the container mounted at shared/logs instead of shared/logs/var-log/?