Skip to content

Fix static files not served in Docker deployment and DEBUG mode misconfiguration#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-deployment-errors
Draft

Fix static files not served in Docker deployment and DEBUG mode misconfiguration#2
Copilot wants to merge 3 commits intomainfrom
copilot/fix-deployment-errors

Conversation

Copy link

Copilot AI commented Feb 23, 2026

Two bugs prevent correct Docker deployment: static files collected by collectstatic are written outside the shared nginx volume, and DEBUG is always truthy due to string env var parsing.

Fixes

  • STATIC_ROOT path mismatchos.path.join(BASE_DIR, 'static/') resolves to /securityeventsexplorer/static/ inside the container, but docker-compose.yml mounts the shared volume at /static/. Nginx never saw the collected assets. Changed to the absolute path /static/.

  • DEBUG string coercionos.getenv('DEBUG') returns the string "False", which is truthy in Python, causing Django to run in debug mode regardless of the env value. Changed to explicit comparison:

    DEBUG = os.getenv('DEBUG', 'False') == 'True'

Housekeeping

  • Added .gitignore to exclude __pycache__, db.sqlite3, debug.log, and collectstatic output directories.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 23, 2026 14:41
Co-authored-by: Balzu <24792152+Balzu@users.noreply.github.com>
…rsing

Co-authored-by: Balzu <24792152+Balzu@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix errors in tool deployment Fix static files not served in Docker deployment and DEBUG mode misconfiguration Feb 23, 2026
Copilot AI requested a review from Balzu February 23, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants