diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d9c000b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - name: Build + run: docker compose build + - name: Pytest + run: docker compose run --rm web pytest + - name: Ruff + run: docker compose run --rm web ruff check . + - name: Mypy + run: docker compose run --rm web mypy apps config diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..484c7ff --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +## 2026-02-28 + +- Scaffolded Dockerized Django/Wagtail project structure with split settings. +- Implemented core apps: blog, authors, legal, comments, newsletter, core consent/settings. +- Added Wagtail models, snippets, StreamField blocks, RSS feeds, sitemap/robots routes. +- Added consent middleware/service and cookie banner integration. +- Added comment submission flow with moderation-ready model and rate limiting. +- Added newsletter subscription + confirmation flow with provider sync abstraction. +- Added templates/static assets baseline for homepage, article index/read, legal, about. +- Added pytest suite with >90% coverage enforcement and passing Docker CI checks. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5222a2b --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# No Hype AI + +Django 5.2 + Wagtail 7 blog engine for No Hype AI. + +## Environment Variables + +Required: +- `SECRET_KEY` +- `DATABASE_URL` +- `ALLOWED_HOSTS` +- `DEBUG` +- `WAGTAIL_SITE_NAME` + +Also used: +- `WAGTAILADMIN_BASE_URL` +- `CONSENT_POLICY_VERSION` +- `EMAIL_BACKEND` +- `EMAIL_HOST` +- `EMAIL_PORT` +- `EMAIL_USE_TLS` +- `EMAIL_HOST_USER` +- `EMAIL_HOST_PASSWORD` +- `DEFAULT_FROM_EMAIL` +- `NEWSLETTER_PROVIDER` + +## Containerized Development + +```bash +docker compose build +docker compose run --rm web python manage.py migrate +docker compose up +``` + +App is exposed on `http://localhost:8035`. + +## Test/Lint/Typecheck (Docker) + +```bash +docker compose run --rm web pytest +docker compose run --rm web ruff check . +docker compose run --rm web mypy apps config +``` + +## Deploy Runbook + +```bash +git pull origin main +pip install -r requirements/production.txt +python manage.py migrate --run-syncdb +python manage.py collectstatic --noinput +sudo systemctl reload gunicorn +``` + +## Backups + +- PostgreSQL dump daily: `pg_dump | gzip > backup-$(date +%Y%m%d).sql.gz` +- `MEDIA_ROOT` rsynced offsite daily