feat: add Django project scaffold, configuration and container

Environment-variable configuration that fails fast, database-only health
check, JSON request logs with a request id, security headers with a strict
CSP, and a multi-stage non-root Docker image with compose file. Ticket 1.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sk72AxLwQnYttF6VFSxQLt
This commit is contained in:
Ebbe Baß
2026-10-15 13:44:07 +02:00
co-authored by Claude Sonnet 5.5
parent 24de5878ed
commit f8b0584687
31 changed files with 1134 additions and 2 deletions
+43
View File
@@ -0,0 +1,43 @@
[project]
name = "self-service-portal"
version = "0.1.0"
description = "Self-service portal for directory users"
readme = "README.md"
requires-python = ">=3.13,<3.14"
dependencies = [
"django>=5.2,<5.3",
"gunicorn>=23.0",
"whitenoise>=6.9",
"tzdata",
]
[dependency-groups]
dev = [
"pytest>=8",
"pytest-django>=4.9",
"pytest-env>=1.1",
"ruff>=0.8",
]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "portal.config.settings"
testpaths = ["portal/tests"]
filterwarnings = ["ignore:No directory at:UserWarning"]
env = [
"SECRET_KEY=test-only-secret-key-not-for-use-0123456789abcdef",
"ALLOWED_HOSTS=testserver,localhost",
"DATA_DIR=.",
"DEBUG=false",
"LOG_LEVEL=INFO",
]
[tool.ruff]
line-length = 100
target-version = "py313"
extend-exclude = ["_bmad", "_bmad-output", ".agents", "context-resources"]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "S"]
[tool.ruff.lint.per-file-ignores]
"portal/tests/*" = ["S"]