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 \