Skip to content

Commit cb17bcf

Browse files
committed
Fixes #2: supervisord logs available via 'docker logs'
1 parent 84bbdd7 commit cb17bcf

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Just add you supervisord config(s) to `/etc/supervisor.d/` directory to launch y
1515

1616
Learn more about about [supervisord inside containers on official Docker documentation](https://docs.docker.com/articles/using_supervisord/).
1717

18+
##### - error logging
19+
20+
Logfile for supervisord is switched off to avoid logging inside container. Instead, all logs are easily available via `docker logs [container name]`.
21+
22+
This is probably the best approach if you'd like to source your logs from outside the container via `docker logs` (also via CoreOS `journald') and you don't want to worry about logging and log management inside your container and/or data volume.
23+
1824
##### - /data volume
1925

2026
The `/data` directory is meant to be used to simply and easily deploy web applications using a volume binding on `/data`, presumably using [data only containers](https://docs.docker.com/userguide/dockervolumes/) pattern.

supervisord.conf

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
[supervisord]
22
pidfile = /var/run/supervisord.pid
3-
logfile = /var/log/supervisor/supervisord.log
4-
childlogdir = /var/log/supervisor/
5-
6-
# Do we really need to interact with supervisord?
7-
#[supervisorctl]
8-
#serverurl = unix:///var/run/supervisord.sock
9-
10-
# inet_http_server, rpcinterface:supervisor if you want to use supervisorctl
11-
#[unix_http_server]
12-
#file = /var/run/supervisord.sock
13-
14-
#[rpcinterface:supervisor]
15-
#supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
3+
logfile = NONE
4+
# Set loglevel=debug, only then all logs from child services are printed out
5+
# to container logs (and thus available via `docker logs [container]`
6+
loglevel = debug
167

178
[include]
189
files = /etc/supervisord.d/*.conf

0 commit comments

Comments
 (0)