1.3 KiB
Operations
Deployment
- Generate an Argon2id hash with
npm run password:hash -w @tech-library/api -- "a strong password". - Copy
.env.exampleto.env, set the hash, a random 32+ character session secret,HOST_PORT(default8144), and the matching publicWEB_ORIGIN. - Run
docker compose up -d --build. - Verify
http://host:8144/healthz(or the configuredHOST_PORT) and the API health check through Docker Compose.
Terminate TLS at a trusted reverse proxy and forward HTTPS to the configured host port. Restrict filesystem access to the Docker volume and secrets file.
Backup and restore
Run scripts/backup.ps1 against a stopped instance or a host-installed sqlite3 client. The command uses SQLite's online backup operation. Retain encrypted off-host copies and test restoration regularly.
Before restoration, stop API and worker, validate the target path, run scripts/restore.ps1 -Backup <file>, and restart the services. Confirm /health and a known topic afterward.
Monitoring
All services expose structured container logs. Alert on API health failure, worker source_poll.failed events, a growing pending-findings queue, backup failure, and low volume capacity. Source fetch errors remain attached to subscriptions and never change published content.