File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ if [ "$(id -u)" = "0" ]; then
1111 # Reassign the pgadmin user to the desired UID/GID
1212 usermod -o -u " $PUID " -g " $PGID " pgadmin 2> /dev/null || true
1313
14+ # Compose su-exec command
15+ SU_EXEC=" su-exec $PUID :$PGID "
1416 echo " pgAdmin will run as UID=$PUID , GID=$PGID "
17+ else
18+ SU_EXEC=" "
1519fi
1620
1721# Fixup the passwd file, in case we're on OpenShift
210214fi
211215
212216if [ -n " ${PGADMIN_ENABLE_TLS} " ]; then
213- exec su-exec " $PUID : $PGID " /venv/bin/gunicorn --limit-request-line " ${GUNICORN_LIMIT_REQUEST_LINE:- 8190} " --timeout " ${TIMEOUT} " --bind " ${BIND_ADDRESS} " -w 1 --threads " ${GUNICORN_THREADS:- 25} " --access-logfile " ${GUNICORN_ACCESS_LOGFILE:- -} " --keyfile /certs/server.key --certfile /certs/server.cert -c gunicorn_config.py run_pgadmin:app
217+ exec $SU_EXEC /venv/bin/gunicorn --limit-request-line " ${GUNICORN_LIMIT_REQUEST_LINE:- 8190} " --timeout " ${TIMEOUT} " --bind " ${BIND_ADDRESS} " -w 1 --threads " ${GUNICORN_THREADS:- 25} " --access-logfile " ${GUNICORN_ACCESS_LOGFILE:- -} " --keyfile /certs/server.key --certfile /certs/server.cert -c gunicorn_config.py run_pgadmin:app
214218else
215- exec su-exec " $PUID : $PGID " /venv/bin/gunicorn --limit-request-line " ${GUNICORN_LIMIT_REQUEST_LINE:- 8190} " --limit-request-fields " ${GUNICORN_LIMIT_REQUEST_FIELDS:- 100} " --limit-request-field_size " ${GUNICORN_LIMIT_REQUEST_FIELD_SIZE:- 8190} " --timeout " ${TIMEOUT} " --bind " ${BIND_ADDRESS} " -w 1 --threads " ${GUNICORN_THREADS:- 25} " --access-logfile " ${GUNICORN_ACCESS_LOGFILE:- -} " -c gunicorn_config.py run_pgadmin:app
219+ exec $SU_EXEC /venv/bin/gunicorn --limit-request-line " ${GUNICORN_LIMIT_REQUEST_LINE:- 8190} " --limit-request-fields " ${GUNICORN_LIMIT_REQUEST_FIELDS:- 100} " --limit-request-field_size " ${GUNICORN_LIMIT_REQUEST_FIELD_SIZE:- 8190} " --timeout " ${TIMEOUT} " --bind " ${BIND_ADDRESS} " -w 1 --threads " ${GUNICORN_THREADS:- 25} " --access-logfile " ${GUNICORN_ACCESS_LOGFILE:- -} " -c gunicorn_config.py run_pgadmin:app
216220fi
You can’t perform that action at this time.
0 commit comments