From 9e74819d92d47b23250db16db41fc53920a9da37 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Tue, 5 Mar 2024 12:15:25 +0100 Subject: [PATCH] check for pre-start script Keep the functionality from the original start script. Source: https://github.com/tiangolo/meinheld-gunicorn-docker/blob/master/docker-images/start.sh --- start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/start.sh b/start.sh index 46e4931..7dbfe5b 100644 --- a/start.sh +++ b/start.sh @@ -1,5 +1,16 @@ #! /usr/bin/env bash set -eu + +# If there's a prestart.sh script in the /app directory, run it before starting +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" + . "$PRE_START_PATH" +else + echo "There is no script $PRE_START_PATH" +fi + if [ ${MODE:-""} == "development" ]; then if [ -f /app/requirements.txt ]; then pip install -r /app/requirements.txt; fi exec python web.py