Fix --metrics in docker images

This commit is contained in:
Piero Toffanin
2025-12-10 12:46:53 -05:00
parent 00d01a99d7
commit 296e53e511
2 changed files with 10 additions and 7 deletions
+9 -1
View File
@@ -40,5 +40,13 @@ fi
unset LT_UPDATE_MODELS
unset FORCE_UPDATE_MODELS
PROMETHEUS_MULTIPROC_DIR="${__dirname}/../db/prometheus" ./venv/bin/gunicorn -c scripts/gunicorn_conf.py --workers $LT_THREADS --max-requests 250 --timeout 2400 --bind $BIND_ADDR:$LT_PORT 'wsgi:app'
# Setup prometheus metrics db
export PROMETHEUS_MULTIPROC_DIR=$(realpath "${__dirname}/../db/prometheus")
if [[ -e "$PROMETHEUS_MULTIPROC_DIR" ]]; then
find "$PROMETHEUS_MULTIPROC_DIR" -name '*.db' -delete
else
mkdir -p "$PROMETHEUS_MULTIPROC_DIR"
fi
./venv/bin/gunicorn -c scripts/gunicorn_conf.py --workers $LT_THREADS --max-requests 250 --timeout 2400 --bind $BIND_ADDR:$LT_PORT 'wsgi:app()'