- 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/
36 lines
963 B
Markdown
36 lines
963 B
Markdown
# 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
|
|
```
|