From c348efb74b0ae0abe49dfb528207fd70d5d03792 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 24 Nov 2023 10:32:18 +0000 Subject: [PATCH] Use single entrypoint for both images but detect which to run --- bin/docker-server | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/docker-server b/bin/docker-server index b6fe91c32ba017..5b4daefbedded1 100755 --- a/bin/docker-server +++ b/bin/docker-server @@ -3,6 +3,12 @@ set -e ./bin/migrate-check +# if we are on the unit image run the unit entrypoint +if [ -f /usr/local/bin/docker-entrypoint.sh ]; then + echo "Running unit entrypoint" + exec $(dirname -- "${BASH_SOURCE[0]}")/docker-server-unit +fi + # To ensure we are able to expose metrics from multiple processes, we need to # provide a directory for `prometheus_client` to store a shared registry. export PROMETHEUS_MULTIPROC_DIR=$(mktemp -d) @@ -10,6 +16,7 @@ trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT export PROMETHEUS_METRICS_EXPORT_PORT=8001 export STATSD_PORT=${STATSD_PORT:-8125} +echo "Running gunicorn" exec gunicorn posthog.wsgi \ --config gunicorn.config.py \