refactor: enhance backup and restore scripts, add health check functionality, and update README with operational instructions
This commit is contained in:
@@ -42,6 +42,18 @@ Start:
|
||||
docker compose -f docker-compose.full.yml up -d --build
|
||||
```
|
||||
|
||||
Check the running stack:
|
||||
|
||||
```bash
|
||||
sh ./scripts/selfhost-doctor.sh
|
||||
```
|
||||
|
||||
To run a real Auth signup/login smoke test, enable the optional check:
|
||||
|
||||
```bash
|
||||
NETA_DOCTOR_AUTH_SMOKE=1 sh ./scripts/selfhost-doctor.sh
|
||||
```
|
||||
|
||||
## App-Only Mode
|
||||
|
||||
Use this when Neta connects to an existing Supabase or Supabase-compatible backend.
|
||||
@@ -84,6 +96,34 @@ Create a Compose app from this repository. Use `docker-compose.full.yml` for ful
|
||||
|
||||
Route the Neta domain to `neta-web` port `3000`. Route the bundled Supabase API domain, if used, to `neta-supabase-proxy` port `8000`.
|
||||
|
||||
## Backup And Restore
|
||||
|
||||
Full-stack mode stores the database in the `neta-db-data` Docker volume and uploaded files in the `neta-storage-data` Docker volume.
|
||||
|
||||
Create a backup:
|
||||
|
||||
```bash
|
||||
sh ./scripts/selfhost-backup.sh
|
||||
```
|
||||
|
||||
The backup is written to `./backups/<timestamp>/` and contains:
|
||||
|
||||
- `postgres.dump`: custom-format Postgres dump
|
||||
- `storage.tar.gz`: local storage archive
|
||||
- `manifest.txt`: backup metadata
|
||||
|
||||
Restore a backup:
|
||||
|
||||
```bash
|
||||
sh ./scripts/selfhost-restore.sh ./backups/20260101T120000Z
|
||||
```
|
||||
|
||||
Set `NETA_RESTORE_FORCE=1` for non-interactive restores:
|
||||
|
||||
```bash
|
||||
NETA_RESTORE_FORCE=1 sh ./scripts/selfhost-restore.sh ./backups/20260101T120000Z
|
||||
```
|
||||
|
||||
## First Admin
|
||||
|
||||
Open `/register` after the stack starts. The first registered user becomes the admin, and public registration is locked after that.
|
||||
|
||||
Reference in New Issue
Block a user