docs(infra): add PostgreSQL tuning and systemd service documentation

- POSTGRESQL_TUNING.md: documents applied config (8GB shared_buffers,
  64MB work_mem, 8GB max_wal_size, SSD params)
- SYSTEMD_SERVICES.md: lists all production systemd services
- systemd/: versioned copies of all .service and .timer files
- .gitignore: ignore package-lock.json and backups/
This commit is contained in:
2026-04-29 06:30:22 +00:00
parent 44c3a6c910
commit c766571b7d
11 changed files with 196 additions and 0 deletions

35
docs/SYSTEMD_SERVICES.md Normal file
View File

@@ -0,0 +1,35 @@
# Systemd Services — Nexus Autoparts
All production services are managed via systemd. Files are versioned in `systemd/`.
## Services
| Service | Description | Status |
|---------|-------------|--------|
| `nexus-pos.service` | Gunicorn POS (Flask), port 5001 | Active |
| `nexus.service` | Dashboard (Flask), port 5000 | Active |
| `nexus-quart.service` | Hypercorn async catalog, port 5002 | Active |
| `nexus-celery.service` | Celery worker (4 prefork) | Active |
| `nexus-mv-refresh.timer` | Daily MV refresh at 03:00 UTC | Active |
| `nexus-cache-warm.timer` | Daily Redis cache warming at 04:00 UTC | Active |
## Commands
```bash
# Reload all
systemctl daemon-reload
# Restart POS
systemctl restart nexus-pos.service
# View logs
journalctl -u nexus-pos.service -f
```
## Installation
```bash
sudo cp systemd/*.service systemd/*.timer /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now nexus-pos.service nexus-cache-warm.timer
```