/
Art86
/
DefectDojo-DevSecOps
Обзор
Документация
Войти
/
Art86
/
DefectDojo-DevSecOps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
docker/entrypoint-uwsgi-dev.sh
47 строк
2 KB
kiblik
feat(broker): Add start-up checker (#13931)
22 дек 2025, 15:24
22 дек 2025, 15:24
e6fa4b2
Код
Авторство
О чём код?
#!/bin/bash set -e # needed to handle "exit" correctly . /secret-file-loader.sh . /reach_database.sh . /reach_broker.sh wait_for_database_to_be_reachable wait_for_broker_to_be_reachable echo cd /app || exit # Full list of uwsgi options: https://uwsgi-docs.readthedocs.io/en/latest/Options.html # --lazy-apps required for debugging --> https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html?highlight=lazy-apps#preforking-vs-lazy-apps-vs-lazy DD_UWSGI_LOGFORMAT_DEFAULT='[pid: %(pid)|app: -|req: -/-] %(addr) (%(dd_user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core))' if [ "${DD_DEBUG}" = "True" ]; then echo "Debug mode enabled, reducing # of processes and threads to 1" DD_UWSGI_NUM_OF_PROCESSES=1 DD_UWSGI_NUM_OF_THREADS=1 fi # hot reload also on html/template changes watchmedo shell-command \ --patterns="*.html;*.tpl" \ --recursive \ --command='touch /app/dojo/settings/settings.py' \ /app/dojo & exec uwsgi \ "--${DD_UWSGI_MODE}" "${DD_UWSGI_ENDPOINT}" \ --protocol uwsgi \ --wsgi dojo.wsgi:application \ --enable-threads \ --processes "${DD_UWSGI_NUM_OF_PROCESSES:-4}" \ --threads "${DD_UWSGI_NUM_OF_THREADS:-4}" \ --reload-mercy 1 \ --worker-reload-mercy 1 \ --py-autoreload 1 \ --buffer-size="${DD_UWSGI_BUFFER_SIZE:-8192}" \ --lazy-apps \ --touch-reload="/app/dojo/settings/settings.py" \ --logformat "${DD_UWSGI_LOGFORMAT:-$DD_UWSGI_LOGFORMAT_DEFAULT}"