ops: add PostgreSQL compose deployment
Verify and deploy production / verify-and-deploy (push) Successful in 2m45s

This commit is contained in:
2026-10-05 16:01:01 +08:00
parent 7e7e26d869
commit 53b0c62120
3 changed files with 54 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
# PostgreSQL deployment
The production database runs through Docker Compose and is only exposed on the server loopback interface.
It is managed independently from the application CI deployment.
- Database: `rednote_studio`
- User: `rednote_studio`
- Address from the host: `127.0.0.1:5432`
- Persistent data: `/var/lib/rednote-tool-studio/postgres`
- Password secret: `/etc/rednote-tool-studio/postgres-password`
Start or update it on the production host:
```bash
docker compose -f /opt/rednote-tool-studio/postgres/compose.yml pull
docker compose -f /opt/rednote-tool-studio/postgres/compose.yml up -d
docker compose -f /opt/rednote-tool-studio/postgres/compose.yml ps
```
The password file must already exist, be owned by root, and use mode `0600`. Never commit it to the repository.