docs(readme): README с описанием стека, deploy и security (GitHub mirror)
Some checks failed
deploy / deploy (push) Has been cancelled
security / security (push) Has been cancelled

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
striker
2026-05-24 17:52:56 +03:00
parent 708ee41596
commit fb613d0b02

54
README.md Normal file
View File

@@ -0,0 +1,54 @@
# pushkinohistory.ru
Сайт «История города Пушкино» — портал с историческими материалами, новостями и агрегатором региональных RSS-источников.
**Production:** https://pushkinohistory.ru
> **Mirror.** Source-of-truth: `git.striker.su/striker/pushkinohistory-ru-v2`. Этот репозиторий на GitHub — резервная копия + площадка для GitHub Actions security-сканов.
## Стек
- **Astro 5** + Content Collections + markdown
- **nginx:1.29-alpine** в runtime-контейнере
- **PT Serif** (заголовки/тело статьи) + **IBM Plex Sans** (UI)
- **sanitize-html** — очистка тела поста для RSS `<content:encoded>` с CDATA
- **fast-xml-parser** — изолированный cron-агрегатор внешних RSS
## Деплой
`git push` → Gitea Actions (`.gitea/workflows/deploy.yml`) → SSH на `web.hhivp.com`:
1. `git pull --ff-only` в `/opt/docker/sites/pushkinohistory-ru-v2`
2. `docker compose build`
3. **Trivy** scan свежесобранного образа (HIGH/CRITICAL, warning-only)
4. `docker compose up -d` → healthcheck `http://127.0.0.1:4146/`
5. **IndexNow** ping Яндекс/Bing (sitemap-based)
6. `docker image prune -af --filter "until=168h"`
Контейнер `pushkinohistory-ru-v2:4146` за хостовым nginx.
## Security
Все автоматические проверки описаны в [`SECURITY.md`](SECURITY.md):
- **Layer A** (на каждый push): Trivy + npm audit
- **Layer B** (weekly cron на rd.hhivp.com): Nuclei DAST
- **Layer C** (на push + MR): Hadolint + GitLeaks + Semgrep
## Локальная разработка
```bash
npm install
npm run dev # http://localhost:4321
npm run build # → dist/ (статика)
npm run preview
```
## История
- **2026-05-21:** v2 — Astro 5 + Content Collections.
- **2026-05-23:** WordPress v1 контейнер удалён, бэкапы в `/opt/backup/`.
## Контакты
- Email: admin@hhivp.com
- Site: https://hhivp.com/