README: document Git repo and deploy-from-Git flow
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,6 +28,11 @@ Web dashboard to view and edit the `portal_auth` database. **Only users with rol
|
||||
- **Auth logs**: View only (append-only log).
|
||||
- **API tokens**: View; activate/deactivate; delete.
|
||||
|
||||
## Git repository
|
||||
|
||||
- **URL:** http://10.20.30.250:3000/nearxos/portal-auth-dashboard
|
||||
- **Clone:** `git clone http://10.20.30.250:3000/nearxos/portal-auth-dashboard.git`
|
||||
|
||||
## Deployment to Auth LXC (10.110.60.210)
|
||||
|
||||
From your machine (with SSH access to the server):
|
||||
@@ -37,10 +42,15 @@ From your machine (with SSH access to the server):
|
||||
```
|
||||
|
||||
This will:
|
||||
- Rsync app files to `/opt/portal-auth-dashboard` on `root@10.110.60.210`
|
||||
- Create a Python venv and install dependencies (including gunicorn)
|
||||
- Create `.env` from `deploy/.env.server` if missing (you must edit it on the server to set `DB_AUTH_PASSWORD` and `SECRET_KEY`)
|
||||
- Install and start the systemd unit `portal-auth-dashboard` (listens on port 5000)
|
||||
- **First time:** Clone the repo from Git to `/opt/portal-auth-dashboard` on `root@10.110.60.210`, create venv, install dependencies, create `.env` from `deploy/.env.server` if missing, install and start the systemd unit.
|
||||
- **Later runs:** Pull latest from `origin/main`, reinstall dependencies, restart the service.
|
||||
|
||||
If the Git server is not reachable from the deploy target (e.g. private repo), set `GIT_REPO_URL` with credentials before running:
|
||||
|
||||
```bash
|
||||
export GIT_REPO_URL="http://nearxos:YOUR_TOKEN@10.20.30.250:3000/nearxos/portal-auth-dashboard.git"
|
||||
./deploy/deploy.sh
|
||||
```
|
||||
|
||||
**After first deploy**, on the server set the real credentials:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user