Skip to content
9 changes: 5 additions & 4 deletions supervisor_templates/supervisord.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

[unix_http_server]
file=${SUPERVISORD_SOCKET_FILE} ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
chmod=0700 ; socket file mode (default 0700)

[supervisord]
logfile=/usr/local/supervisor/supervisord.log ;
pidfile=${SUPERVISORD_PID_FILE} ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
logfile=/dev/stdout ; send supervisor logs to stdout
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to duplicate the logs to stdout (i.e., they're sent twice for the supervisord's process logs):

$ docker compose logs
WARN[0000] The "CI" variable is not set. Defaulting to a blank string.
app-1  | docker-entrypoint.sh running
app-1  | enable-documentation-server.sh running
app-1  | Enabling documentation server
app-1  | Allowing unauthenticated access to documentation server
app-1  | Swagger/OpenAPI documentation server available at http://localhost:8089/api-docs
app-1  | secrets.sh running
app-1  | secrets.sh complete
app-1  | Invoking Wowza's /sbin/entrypoint.sh
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngine.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngine.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngineManager.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngineManager.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Set uid to user 40041 succeeded
app-1  | 2025-12-02 00:07:21,887 INFO Set uid to user 40041 succeeded
app-1  | 2025-12-02 00:07:21,892 INFO RPC interface 'supervisor' initialized
app-1  | 2025-12-02 00:07:21,892 INFO RPC interface 'supervisor' initialized
app-1  | 2025-12-02 00:07:21,892 CRIT Server 'unix_http_server' running without any HTTP authentication checking
app-1  | 2025-12-02 00:07:21,892 CRIT Server 'unix_http_server' running without any HTTP authentication checking
app-1  | 2025-12-02 00:07:21,893 INFO supervisord started with pid 1
app-1  | 2025-12-02 00:07:21,893 INFO supervisord started with pid 1
app-1  | 2025-12-02 00:07:22,906 INFO spawned: 'WowzaStreamingEngine' with pid 19
app-1  | 2025-12-02 00:07:22,906 INFO spawned: 'WowzaStreamingEngine' with pid 19
app-1  | 2025-12-02 00:07:22,912 INFO spawned: 'WowzaStreamingEngineManager' with pid 20
app-1  | 2025-12-02 00:07:22,912 INFO spawned: 'WowzaStreamingEngineManager' with pid 20
app-1  | INFO: Main.main: root: /usr/local/WowzaStreamingEngine/manager
app-1  | INFO: Main.main: loadApplication: launch.Application
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngine entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngine entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngineManager entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngineManager entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Copy link
Copy Markdown
Member

@danschmidt5189 danschmidt5189 Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker recommends a few modifications to this, most notably setting supervisord's logfile to /dev/null:

[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0

[program:app]
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

I'm not sure why they write program logs to /dev/fd/1 versus the more familar /dev/stdout, when as far as I can tell they're equivalent. From this image:

# ls -l /dev/stdout
lrwxrwxrwx 1 root root 15 Dec  2 07:56 /dev/stdout -> /proc/self/fd/1

# ls -l /proc/self/fd/1
lrwx------ 1 root root 64 Dec  2 07:56 /proc/self/fd/1 -> /dev/pts/0

# ls -l /dev/fd/1
lrwx------ 1 root root 64 Dec  2 07:56 /dev/fd/1 -> /dev/pts/0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 7bcaad7. nodaemon=true is unnecessary as the Wowza image entrypoint that our entrypoint script execs into calls supervisord -n.

logfile_maxbytes = 0 ; forcibly disable log rotation
pidfile=${SUPERVISORD_PID_FILE} ; (supervisord pidfile;default supervisord.pid)
childlogdir=/usr/local/supervisor ; ('AUTO' child log dir, default $TEMP)
user=${APP_USER}

; the below section must remain in the config file for RPC
Expand Down