Files
rengine/web/entrypoint-dev.sh
T
2c9e2503a9 Complete dev environment to debug/code easily (#1196)
* Add django debug toolbar

* Remove duplicate debug toolbar URLs

* Remove orphaned import in startScan

* Add DEBUG config commented in entrypoint

* Install debug toolbar into celery beat

* Create dev docker compose & entrypoints

* Move django toolbar install to dev entrypoints

* Install debug_toolbar only when debug env var is set

* Add dev command to MakeFile

* Use DEBUG from settings.py exclusively

* Add remote debug configuration in dev env

* Add VSCode debug configuration

* Celery log level to 1 when debug is on

* Remove hard coded celery debug port

* Add gunicorn in the production setup

* Add export var for celery log level

* Restrict debug port to 127.0.0.1

* Set remote debug to false by default

* Update doc on debug step for submitting issue

* Create dev docker compose & entrypoints

* Add django debug toolbar

* Remove duplicate debug toolbar URLs

* Remove orphaned import in startScan

* Add DEBUG config commented in entrypoint

* Install debug toolbar into celery beat

* Move django toolbar install to dev entrypoints

* Install debug_toolbar only when debug env var is set

* Add dev command to MakeFile

* Use DEBUG from settings.py exclusively

* Add remote debug configuration in dev env

* Add VSCode debug configuration

* Celery log level to 1 when debug is on

* Remove hard coded celery debug port

* Add gunicorn in the production setup

* Add export var for celery log level

* Restrict debug port to 127.0.0.1

* Set remote debug to false by default

* Update doc on debug step for submitting issue

---------

Co-authored-by: Raynald <raynald@easi-services.fr>
Co-authored-by: Psyray <psyray@users.noreply.github.com>
2024-03-18 10:33:16 +01:00

22 lines
421 B
Bash
Executable File

#!/bin/bash
if [ "$DEBUG" == "1" ]; then
# Django debug toolbar
pip install django-debug-toolbar
fi
# Check if remote debugging is enabled and set concurrency to 1 for easier debug
if [ "$REMOTE_DEBUG" == "1" ]; then
# Live debug
pip install debugpy
# To debug opened port with netstat
apt install net-tools -y
fi
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:8000
exec "$@"