From b11796646518027af2b17f4b2563600ae126de5f Mon Sep 17 00:00:00 2001 From: matus Date: Fri, 2 Aug 2019 09:26:08 +0200 Subject: [PATCH] enable custom prestart script path with PRE_START_PATH env variable --- python3.6-alpine3.8/start-reload.sh | 4 ++-- python3.6-alpine3.8/start.sh | 4 ++-- python3.6/start-reload.sh | 4 ++-- python3.6/start.sh | 4 ++-- python3.7-alpine3.8/start-reload.sh | 4 ++-- python3.7-alpine3.8/start.sh | 4 ++-- python3.7/start-reload.sh | 4 ++-- python3.7/start.sh | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/python3.6-alpine3.8/start-reload.sh b/python3.6-alpine3.8/start-reload.sh index 01a9e203..0f23d28e 100644 --- a/python3.6-alpine3.8/start-reload.sh +++ b/python3.6-alpine3.8/start-reload.sh @@ -14,8 +14,8 @@ HOST=${HOST:-0.0.0.0} PORT=${PORT:-80} LOG_LEVEL=${LOG_LEVEL:-info} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.6-alpine3.8/start.sh b/python3.6-alpine3.8/start.sh index 65879b4d..835f97b2 100644 --- a/python3.6-alpine3.8/start.sh +++ b/python3.6-alpine3.8/start.sh @@ -19,8 +19,8 @@ else fi export GUNICORN_CONF=${GUNICORN_CONF:-$DEFAULT_GUNICORN_CONF} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.6/start-reload.sh b/python3.6/start-reload.sh index 01a9e203..0f23d28e 100644 --- a/python3.6/start-reload.sh +++ b/python3.6/start-reload.sh @@ -14,8 +14,8 @@ HOST=${HOST:-0.0.0.0} PORT=${PORT:-80} LOG_LEVEL=${LOG_LEVEL:-info} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.6/start.sh b/python3.6/start.sh index 65879b4d..835f97b2 100644 --- a/python3.6/start.sh +++ b/python3.6/start.sh @@ -19,8 +19,8 @@ else fi export GUNICORN_CONF=${GUNICORN_CONF:-$DEFAULT_GUNICORN_CONF} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.7-alpine3.8/start-reload.sh b/python3.7-alpine3.8/start-reload.sh index 01a9e203..0f23d28e 100644 --- a/python3.7-alpine3.8/start-reload.sh +++ b/python3.7-alpine3.8/start-reload.sh @@ -14,8 +14,8 @@ HOST=${HOST:-0.0.0.0} PORT=${PORT:-80} LOG_LEVEL=${LOG_LEVEL:-info} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.7-alpine3.8/start.sh b/python3.7-alpine3.8/start.sh index 65879b4d..835f97b2 100644 --- a/python3.7-alpine3.8/start.sh +++ b/python3.7-alpine3.8/start.sh @@ -19,8 +19,8 @@ else fi export GUNICORN_CONF=${GUNICORN_CONF:-$DEFAULT_GUNICORN_CONF} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.7/start-reload.sh b/python3.7/start-reload.sh index 01a9e203..0f23d28e 100644 --- a/python3.7/start-reload.sh +++ b/python3.7/start-reload.sh @@ -14,8 +14,8 @@ HOST=${HOST:-0.0.0.0} PORT=${PORT:-80} LOG_LEVEL=${LOG_LEVEL:-info} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH" diff --git a/python3.7/start.sh b/python3.7/start.sh index 65879b4d..835f97b2 100644 --- a/python3.7/start.sh +++ b/python3.7/start.sh @@ -19,8 +19,8 @@ else fi export GUNICORN_CONF=${GUNICORN_CONF:-$DEFAULT_GUNICORN_CONF} -# If there's a prestart.sh script in the /app directory, run it before starting -PRE_START_PATH=/app/prestart.sh +# If there's a prestart.sh script in the /app directory or other path specified, run it before starting +PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh} echo "Checking for script in $PRE_START_PATH" if [ -f $PRE_START_PATH ] ; then echo "Running script $PRE_START_PATH"