From d743b25c8f0c96516d9c374ee946e93e937e2c5b Mon Sep 17 00:00:00 2001 From: reivilibre Date: Wed, 27 Apr 2022 14:39:41 +0100 Subject: Use supervisord to supervise Postgres and Caddy in the Complement image. (#12480) Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- docker/prefix-log | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 docker/prefix-log (limited to 'docker/prefix-log') diff --git a/docker/prefix-log b/docker/prefix-log new file mode 100755 index 0000000000..0e26a4f19d --- /dev/null +++ b/docker/prefix-log @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Prefixes all lines on stdout and stderr with the process name (as determined by +# the SUPERVISOR_PROCESS_NAME env var, which is automatically set by Supervisor). +# +# Usage: +# prefix-log command [args...] +# + +exec 1> >(awk '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0}' >&1) +exec 2> >(awk '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0}' >&2) +exec "$@" -- cgit 1.5.1