Files
MoneyFlix/docs/README.md
T
David Santos 0a62a2dd80 docs: align MoneyFlix ops docs to CT 241 / LXC (BIT-28102)
Retire 94.23.75.89/PM2 guidance in product docs; point operators at
systemd moneyflix-redirector, NPM CT 102, the LXC runbook, and smoke script.
Redact inline MariaDB password from redirector deploy notes.

Paperclip-Issue: BIT-28102
Paperclip-Run: c3d1f836-ff51-40fa-a3be-c43a5b452ba1
2026-08-04 21:30:45 +01:00

109 lines
3.7 KiB
Markdown

# MoneyFlix Documentation Index
## Overview
Product docs for the MoneyFlix redirector + CRM stack. **Production is CT 241** on the BitReport Proxmox lab (`10.10.50.37`), not the retired public VM.
> **Retired:** Host `94.23.75.89`, PM2 process management, and Node port **3001** are historical. Operators must use **systemd `moneyflix-redirector`**, nginx **:80 / :8080**, and NPM **CT 102** for the public edge.
## Canonical ops references (Paperclip meta-repo)
| Doc | Purpose |
|-----|---------|
| `docs/runbooks/MONEYFLIX_LXC_DEPLOY_BIT24694.md` | Provisioning, secrets, NPM hosts, rollback, service management |
| `docs/environments/03-lxc.md` | Inventory row for CT **241** (`moneyflix`) |
## Smoke test (this repo)
```bash
CT_IP=10.10.50.37 bash tools/proxmox/smoke_moneyflix_prod.sh
```
## Documentation map
### Architecture and configuration
- [../README_MONEYFLIX.md](../README_MONEYFLIX.md) — main product overview (CT 241)
- [MONEYFLIX_CLIENT_CONFIGURATION.md](MONEYFLIX_CLIENT_CONFIGURATION.md) — client branding / CRM module notes (may still mention legacy host; prefer README + runbook for ops)
### Deploy and operations
- [DEPLOY_SCRIPTS_DOCUMENTATION.md](DEPLOY_SCRIPTS_DOCUMENTATION.md) — legacy deploy-script notes (annotate against CT 241 before use)
- [REDIRECTOR_DEPLOYMENT.md](REDIRECTOR_DEPLOYMENT.md) — historical redirector deploy notes (legacy host retired)
- [../nodejs-redirector/README.md](../nodejs-redirector/README.md) — Node app notes
- [../crm/README.md](../crm/README.md) — CRM code reference
- [../tools/proxmox/smoke_moneyflix_prod.sh](../tools/proxmox/smoke_moneyflix_prod.sh) — production smoke
## Quick reference
### Production host
| Item | Value |
|------|-------|
| VMID | **241** |
| IP | **10.10.50.37** |
| App path | `/opt/moneyflix` |
| Redirector | systemd `moneyflix-redirector` (Node :3000 behind nginx :80) |
| CRM | nginx :8080 → php8.1-fpm |
| Edge / TLS | NPM CT 102 → `redirect.moneyflix.com` |
| Secrets | `/etc/moneyflix/moneyflix.env` (vault only — never commit) |
### Checks
```bash
curl -sf https://redirect.moneyflix.com/health
curl -sf http://10.10.50.37/health
curl -sf http://10.10.50.37:8080/system/status
```
### Service commands (on CT 241)
```bash
systemctl status moneyflix-redirector nginx php8.1-fpm mariadb
journalctl -u moneyflix-redirector -n 50 --no-pager
systemctl restart moneyflix-redirector
systemctl reload nginx
```
### API (placeholders)
- **LAN CRM API:** `http://10.10.50.37:8080/api/redirects`
- **Key:** `<REDIRECTS_API_KEY>` from vault / Infisical (never paste live keys into Git)
- **Host header** (when needed): `redirect.moneyflix.com`
## Branding
- Primary colour: `#22c55e`
- Theme: dark mode
- Logo path (CRM assets): `/assets/images/moneyflix-dark.png`
## Troubleshooting
1. **Redirect broken** — smoke script + CRM API + `journalctl -u moneyflix-redirector`
2. **Public domain / TLS** — NPM CT 102 upstream to `10.10.50.37:80`
3. **CRM admin** — nginx :8080 / php-fpm on CT 241
4. **Do not** fall back to `94.23.75.89` or PM2
```bash
ssh [email protected] 'systemctl status moneyflix-redirector --no-pager'
CT_IP=10.10.50.37 bash /opt/bitreport/MoneyFlix/tools/proxmox/smoke_moneyflix_prod.sh
```
## Secrets policy
- Zero live credentials in this repository.
- Docs may only show placeholders (`<REDIRECTS_API_KEY>`, `<from vault>`, `your-api-key-here`).
- Rotate via Infisical (CT 235) and `/etc/moneyflix/moneyflix.env` per the LXC runbook.
## Maintenance
- **Daily:** health / smoke as needed; skim redirector journal on incidents
- **After deploy:** always re-run `smoke_moneyflix_prod.sh`
- **Weekly:** confirm NPM proxy hosts still point at CT 241
---
**Last updated:** 2026-08-04
**Canonical prod:** CT 241 / `10.10.50.37`
**Issue:** BIT-28102