Corrective implementation of implementation.md (containerized Django/Wagtail) #3
20
.github/workflows/ci.yml
vendored
Normal file
20
.github/workflows/ci.yml
vendored
Normal file
@@ -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
|
||||||
12
CHANGELOG.md
Normal file
12
CHANGELOG.md
Normal file
@@ -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.
|
||||||
57
README.md
Normal file
57
README.md
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user