Skip to content

Commit

Permalink
Made /var/log/supervisor tmpfs instead of changing log directory on a…
Browse files Browse the repository at this point in the history
…ll containers
  • Loading branch information
assrinivasan committed Nov 27, 2024
1 parent d935c6b commit 1555847
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dockers/docker-base-bookworm/etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; socket file mode (default 0700)

[supervisord]
logfile=/dev/shm/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/dev/shm/supervisor ; ('AUTO' child log dir, default $TEMP)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
user=root

; the below section must remain in the config file for RPC
Expand Down
4 changes: 2 additions & 2 deletions dockers/docker-base-bullseye/etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; socket file mode (default 0700)

[supervisord]
logfile=/dev/shm/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/dev/shm/supervisor ; ('AUTO' child log dir, default $TEMP)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
user=root

; the below section must remain in the config file for RPC
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ start() {
{%- endif %}
-e RUNTIME_OWNER=local \
--uts=host \{# W/A: this should be set per-docker, for those dockers which really need host's UTS namespace #}
--tmpfs /var/log/supervisor:rw \
{%- if install_debug_image == "y" %}
-v /src:/src:ro -v /debug:/debug:rw \
{%- endif %}
Expand Down

0 comments on commit 1555847

Please sign in to comment.