Infrastructure
Database
PostgreSQL guidance
Layout
PostgreSQL runs in Docker on an internal network. Port 5432 is never public.
Roles
| Role | Purpose |
|---|---|
Admin (soviez_admin by default) | Setup only |
Application (soviez_app by default) | The running ERP, with the least privileges it needs |
The application role never has
SUPERUSER, CREATEROLE, CREATEDB, REPLICATION, BYPASSRLS
It is also denied server-file access and COPY ... PROGRAM (pg_execute_server_program, pg_read_server_files, pg_write_server_files).
Good practice
- Use Soviez's backup and restore commands rather than running
pg_dumpby hand - SQL dumps from untrusted sources go through quarantine