-
Notifications
You must be signed in to change notification settings - Fork 11
Enable python debugger for main Django container #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2a7f098
e9c3bc9
ceeaf0a
b38a888
4f160a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,9 @@ services: | |
| required: false | ||
| ports: | ||
| - "8000:8000" | ||
| command: /start | ||
| - "5679:5679" | ||
| command: > | ||
| python -m debugpy --listen 0.0.0.0:5679 -m uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' | ||
|
Comment on lines
+37
to
+38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Command overrides the conditional startup logic in the start script. The hardcoded
Solution: Remove the - command: >
- python -m debugpy --listen 0.0.0.0:5679 -m uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html'Then ensure environment:
- DJANGO_DEBUG=1🤖 Prompt for AI Agents |
||
| networks: | ||
| - default | ||
| - antenna_network | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix variable handling and add
execfor proper signal propagation.Two issues with the debug path:
Missing default value: With
set -o nounset(line 5), the script will fail ifDJANGO_DEBUGis undefined. Use parameter expansion to provide a default.Missing
exec: The debug branch doesn't useexec(unlike line 18), leaving the shell process alive. This prevents proper signal handling (e.g., SIGTERM won't reach the Python process), causing graceful shutdown issues.Apply this diff:
🤖 Prompt for AI Agents