This commit is contained in:
@@ -45,6 +45,42 @@ worker images share the same Node workspace image; the web image builds the Vue
|
||||
application and serves it through Nginx with SPA fallback and internal `/api`
|
||||
proxying.
|
||||
|
||||
## Health Checks
|
||||
|
||||
Production Compose waits for healthy PostgreSQL, Redis, and API services before
|
||||
starting the web service. The API health endpoint is `GET /health`; the web
|
||||
container checks its `/health` response through Nginx.
|
||||
|
||||
## Backup And Restore
|
||||
|
||||
Create a PostgreSQL custom-format dump from the running production stack:
|
||||
|
||||
```sh
|
||||
BACKUP_DIR=/secure/backups \
|
||||
POSTGRES_DB=inventory \
|
||||
POSTGRES_USER=inventory \
|
||||
POSTGRES_PASSWORD='use-secret-storage' \
|
||||
./scripts/backup-postgres.sh
|
||||
```
|
||||
|
||||
Restore only during a planned maintenance window because `pg_restore` replaces
|
||||
matching database objects:
|
||||
|
||||
```sh
|
||||
BACKUP_FILE=/secure/backups/inventory-20260909T000000Z.dump \
|
||||
POSTGRES_DB=inventory \
|
||||
POSTGRES_USER=inventory \
|
||||
POSTGRES_PASSWORD='use-secret-storage' \
|
||||
./scripts/restore-postgres.sh
|
||||
```
|
||||
|
||||
Back up image storage and the deployment `.env` through the NAS secret/backup
|
||||
system as well. Never commit either one. Before upgrading, record the current
|
||||
image tags and database migration state. To roll back, stop the application
|
||||
services, restore the previous image tags, restore the database dump if the
|
||||
schema changed, then start the stack and verify `/health` and a read-only
|
||||
catalog request.
|
||||
|
||||
## Reverse proxy
|
||||
|
||||
Responsible for:
|
||||
|
||||
Reference in New Issue
Block a user