Osedea/nodock

why mount logs on volume?

Opened this issue · 4 comments

Is there a specific reason why you want to mount logs on volume? https://github.com/Osedea/nodock/blob/f851f5e/docker-compose.yml#L59

Hey @0x13A, that way you can access the logs from the host. If your container crashes on boot or you just want to use your host's tools it's quite useful.

If you're running NoDock in production, it makes it easier to use log monitoring software.

Let me know if this answers your question 😄

If your container crashes on boot

You can still check logs with docker logs <container>
You can still plug monitoring tools as docker images and share the volume. This can be a feature request, add ELK stack as a new image in the docker-compose file

I guess is against the idea of docker compose to have logs mounted on the host machine

You can still check logs with docker logs

Fair point.

ELK sounds like the way to go for production but as far as development environments go I think we still need direct access to the logs for simplicity's sake.

I think this can be separated into 2 issues:

  • Enhancement: Removing the mounted volume for the logs + adding the instructions on how to access the logs from the host (through exec probably)
  • Feature: Adding the ELK stack image https://github.com/deviantony/docker-elk

@0x13A Any more thoughts on this?

Makes sense!