Expose AdminJS on nudentic.ir: nginx only proxied /api, so /admin never reached Nest.
This commit is contained in:
@@ -44,7 +44,7 @@ Then `sudo systemctl restart docker` (containers restart).
|
||||
- `REGISTRY_PREFIX=wixur.ir:3000/<gitea-owner>` (same owner as Gitea `REGISTRY_OWNER`)
|
||||
- `TAG=v1.0.1` (CI overrides per release)
|
||||
|
||||
3. **`secrets/backend.env`:** `FRONTEND_URL=https://nudentic.ir`, `COOKIE_SECURE=true`
|
||||
3. **`secrets/backend.env`:** `FRONTEND_URL=https://nudentic.ir`, `COOKIE_SECURE=true`, plus `ADMINJS_EMAIL` / `ADMINJS_PASSWORD` for `https://nudentic.ir/admin`
|
||||
|
||||
4. **SSH** — user that can run `docker` (e.g. `dyolink` in the `docker` group). Put the matching **public** key in `~/.ssh/authorized_keys`.
|
||||
|
||||
@@ -72,7 +72,7 @@ git push origin v1.0.1
|
||||
|
||||
Or Gitea → Actions → **Production — tag build, push, deploy** → Run → tag `v1.0.1`.
|
||||
|
||||
Check `https://nudentic.ir/api/health`.
|
||||
Check `https://nudentic.ir/api/health`. AdminJS is `https://nudentic.ir/admin`.
|
||||
|
||||
---
|
||||
|
||||
@@ -81,8 +81,9 @@ Check `https://nudentic.ir/api/health`.
|
||||
|
||||
```
|
||||
Internet → Nginx (:80 / :443)
|
||||
├── / → frontend:3000 (Next.js)
|
||||
└── /api → backend:3000 (NestJS)
|
||||
├── / → frontend:3000 (Next.js)
|
||||
├── /api → backend:3000 (NestJS API)
|
||||
└── /admin → backend:3000 (AdminJS)
|
||||
└── postgres:5432
|
||||
```
|
||||
|
||||
@@ -496,6 +497,7 @@ docker compose -f docker-compose.prod.yml --env-file .env exec frontend \
|
||||
- [ ] `.env`, `database.env`, `backend.env` configured (real passwords + JWT)
|
||||
- [ ] `./scripts/deploy-prod.sh` completed
|
||||
- [ ] `curl https://DOMAIN/api/health` returns `{"status":"ok",...}`
|
||||
- [ ] `https://DOMAIN/admin` shows the AdminJS login (not the Next.js app)
|
||||
- [ ] App loads in browser
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user