@@ -78,68 +78,24 @@ Then connect and run `CREATE EXTENSION openapi_fdw;`. If an FDW option names a
7878secret environment variable, pass that variable to this PostgreSQL container,
7979not to the control-plane container.
8080
81- ## CapRover
81+ ## Production operation
8282
83- [ ` deploy/caprover/openapi-fdw.yml ` ] ( ../deploy/caprover/openapi-fdw.yml ) is a
84- CapRover v4 one-click definition. It creates:
85-
86- - ` <app> ` : the HTTPS control plane; and
87- - ` <app>-db ` : private PostgreSQL 18 with a persistent volume mounted at
88- ` /var/lib/postgresql ` .
89-
90- In CapRover, choose ** One-Click Apps/Databases** , use the template, provide an
91- app name, keep separate long random PostgreSQL and administrator secrets, and
92- deploy. Enable HTTPS and force HTTPS on the web app. PostgreSQL is deliberately
93- not exposed as a web app and needs no public TCP mapping when its consumers are
94- inside the same Swarm.
95-
96- For an app named ` openapi-fdw ` , another CapRover app reaches PostgreSQL at:
97-
98- ``` text
99- srv-captain--openapi-fdw-db:5432
100- ```
101-
102- Back up the persistent PostgreSQL volume using the same process used for other
103- CapRover databases. The control plane is stateless; its only required state is
104- its environment configuration and the metadata stored in PostgreSQL.
83+ Keep PostgreSQL on a private network unless direct client access is required,
84+ persist ` /var/lib/postgresql ` , and use independent random values for the
85+ database password and control-plane administrator token. Terminate HTTPS in
86+ front of the control plane and retain its secure-cookie default.
10587
10688Upgrades should keep PostgreSQL on the same major unless a normal PostgreSQL
10789major-version upgrade is performed. Updating a same-major image restarts the
10890service with the existing volume and updated extension files. Run
10991` ALTER EXTENSION openapi_fdw UPDATE; ` when a future release introduces an
11092extension upgrade script.
11193
112- ## Metabase
113-
114- Add the deployment as a normal PostgreSQL database. For the CapRover example:
115-
116- ``` text
117- Display name: OpenAPI FDW / BrasilAPI
118- Host: srv-captain--openapi-fdw-db
119- Port: 5432
120- Database: openapi_fdw
121- Username: openapi_fdw
122- Password: <deployment PostgreSQL password>
123- SSL: off for the private CapRover overlay connection
124- ```
125-
126- Grant Metabase a read-only role instead of reusing the owner in a multi-user
127- installation:
128-
129- ``` sql
130- CREATE ROLE metabase_openapi LOGIN PASSWORD ' <different random password>' ;
131- GRANT CONNECT ON DATABASE openapi_fdw TO metabase_openapi;
132- GRANT USAGE ON SCHEMA brasil TO metabase_openapi;
133- GRANT SELECT ON ALL TABLES IN SCHEMA brasil TO metabase_openapi;
134- ALTER DEFAULT PRIVILEGES IN SCHEMA brasil
135- GRANT SELECT ON TABLES TO metabase_openapi;
136- ```
137-
138- Metabase schema sync sees foreign tables and typed columns. Each question or
139- native query that scans one performs live outbound API work, so dashboard
140- refresh frequency and upstream rate limits still matter. For expensive or
141- rate-limited datasets, explicitly materialize selected results in local tables
142- on a schedule instead of treating the FDW as a cache.
94+ Any PostgreSQL-compatible client can connect with the standard host, port,
95+ database, user, and password fields. Prefer a dedicated read-only login and
96+ grant it only ` CONNECT ` , schema ` USAGE ` , foreign-server ` USAGE ` , and ` SELECT `
97+ on the intended foreign tables. Each scan performs live outbound API work, so
98+ client refresh frequency and upstream rate limits still matter.
14399
144100## Checksummed native installation
145101
0 commit comments