Files
scha/scha/settings/__init__.py
T
westfarn 42418fd123
Unit Tests / test (push) Successful in 3s
Dockerize scha + Gitea CI/CD auto-deploy via server-infra (#21)
## Summary
- Dockerize SCHA Wheaton (uv packaging, Dockerfile, compose, entrypoint) and move secrets/DB config to env-driven `scha/settings/`.
- Add Gitea Actions: unit tests on push/PR to `master`, auto-deploy on green master push via `server-infra/scripts/deploy.sh --app scha --env prod`.
- Prod compose uses shared external Postgres only (no bundled DB); control-node secret template at `.env.prod.example`.

Closes #19 (Part A). Depends on companion server-infra PR for catalog/host_apps registration.

## Test plan
- [ ] `uv sync --frozen` + `DJANGO_ENV=dev DJANGO_SECRET_KEY=test uv run python manage.py check`
- [ ] `docker compose build` succeeds locally
- [ ] `docker compose up` serves app against bundled Postgres
- [ ] `./scripts/validate-env.sh ~/Documents/secrets/scha/scha_prod.env` passes
- [ ] After merge + server-infra catalog live: push to master runs Unit Tests then Deploy

Reviewed-on: #21
2026-07-14 03:12:35 -07:00

13 lines
316 B
Python

"""Load environment-specific Django settings based on DJANGO_ENV."""
import os
_environment = os.environ.get("DJANGO_ENV", "dev").lower()
if _environment == "prod":
from .prod import * # noqa: F403
elif _environment == "beta":
from .beta import * # noqa: F403
else:
from .dev import * # noqa: F403