fix(scripts): ensure postgres env aliases during restore
Some checks failed
Deployment CI/CD / validate (push) Has been cancelled
Deployment CI/CD / deploy (push) Has been cancelled

This commit is contained in:
2026-07-14 23:27:11 +03:30
parent a617fdf1ec
commit a2049ea10a
3 changed files with 124 additions and 0 deletions

View File

@@ -94,6 +94,18 @@ cd ~/guilan-ace-deployment
docker compose up -d --build
```
If a new server fails with `Database is uninitialized and superuser password is not specified`,
make sure `backend/guilan-ace-backend/.env` contains `POSTGRES_DB`, `POSTGRES_USER`, and
`POSTGRES_PASSWORD` matching `DB_NAME`, `DB_USER`, and `DB_PASSWORD`. Then remove the failed
empty database volume and rerun the restore:
```bash
cd ~/guilan-ace-deployment
docker compose down
docker volume rm east-guilan_postgres_data
./scripts/restore-from-s3.sh latest
docker compose up -d --build
```
Restore only selected parts by setting skip flags:
```bash
RESTORE_SKIP_ENV=1 ./scripts/restore.sh backups/guilan-ace-backup-YYYYMMDD-HHMMSS.tar.gz