Unit Tests / test (push) Successful in 3s
## 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
33 lines
835 B
Bash
33 lines
835 B
Bash
# Local development environment file (copy to .env).
|
|
# For production server values, use .env.prod.example instead.
|
|
DJANGO_ENV=dev
|
|
DJANGO_DEBUG=true
|
|
DJANGO_SECRET_KEY=change-me-for-local-development
|
|
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0
|
|
# Optional; when unset, http:// origins are derived for local hosts.
|
|
# DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
|
|
|
|
# Database (docker-compose sets DATABASE_URL for the web service)
|
|
DATABASE_URL=postgres://scha:scha@db:5432/scha
|
|
# DB_HOST=db
|
|
# DB_PORT=5432
|
|
# DB_NAME=scha
|
|
# DB_USER=scha
|
|
# DB_PASSWORD=scha
|
|
|
|
# Logging
|
|
# DJANGO_LOG_LEVEL=DEBUG
|
|
|
|
# Stripe (use test keys locally)
|
|
STRIPE_PUBLISHABLE_KEY=
|
|
STRIPE_SECRET_KEY=
|
|
STRIPE_ENDPOINT_SECRET=
|
|
|
|
# reCAPTCHA
|
|
RECAPTCHA_PUBLIC_KEY=
|
|
RECAPTCHA_PRIVATE_KEY=
|
|
|
|
# Gunicorn
|
|
GUNICORN_WORKERS=2
|
|
GUNICORN_BIND=0.0.0.0:8000
|