Add setup_nginx_proxy.sh; update README and CLAUDE.md

Documents OPNsense NGINX proxy setup script (upstream server, upstream,
location, HTTP server creation via OPNsense API with wildcard cert
auto-detection). Marks reverse proxy automation as complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-07 19:49:40 +01:00
parent 6bb3a1d137
commit e4a70fff83
3 changed files with 790 additions and 2 deletions
+2 -1
View File
@@ -44,7 +44,7 @@ bash delete_nginx_proxy.sh --ctid <ctid> [--dry-run] [--debug]
6. **n8n owner setup** tries CLI command first, falls back to REST API `/rest/owner/setup`
7. **RAG workflow setup** (`n8n_setup_rag_workflow` in `libsupabase.sh`) logs into n8n API, creates PostgreSQL + Ollama credentials, processes workflow JSON (replaces credential IDs via Python), imports and activates workflow
8. **Workflow auto-reload** copies `templates/reload-workflow.sh` + `templates/n8n-workflow-reload.service` into CT; systemd service re-imports workflow on every LXC restart
9. **NGINX proxy** optionally calls `setup_nginx_proxy.sh` (not in repo) to configure OPNsense reverse proxy
9. **NGINX proxy** calls `setup_nginx_proxy.sh` to configure OPNsense reverse proxy (upstream server → upstream → location → HTTP server → reconfigure)
10. **JSON output** compact JSON on original stdout (fd 3); credentials also saved to `credentials/<hostname>.json`
### Key Files
@@ -53,6 +53,7 @@ bash delete_nginx_proxy.sh --ctid <ctid> [--dry-run] [--debug]
|------|---------|
| `install.sh` | Main orchestrator argument parsing, LXC lifecycle, stack deployment |
| `libsupabase.sh` | Shared library Proxmox helpers, password/JWT generators, n8n REST API functions |
| `setup_nginx_proxy.sh` | Creates OPNsense NGINX components (upstream server → upstream → location → HTTP server); auto-detects wildcard cert for userman.de; supports `--list-certificates` and `--test-connection` |
| `delete_nginx_proxy.sh` | Removes OPNsense NGINX components (HTTP server, location, upstream) by CTID |
| `templates/docker-compose.yml` | Reference template (actual compose is written inline by `install.sh`) |
| `templates/reload-workflow.sh` | Deployed into CT; re-imports n8n workflow on restart using saved credentials from `.env` |