Skip to content

Commit d39dd1f

Browse files
d-bytebaseclaude
andauthored
docs: improve PG_URL environment variable documentation (#814)
- Rename section from "PG_URL String Format" to "PG_URL Environment Variable" - Add clear documentation for two configuration methods: - Direct connection string - File path for Kubernetes and secret management - Include code examples for both approaches - Document automatic secret rotation support for file-based configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 2bd4506 commit d39dd1f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

mintlify/get-started/self-host/external-postgres.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,23 @@ Grant the db_owner role to the user:
4444
GRANT db_owner TO bytebase;
4545
```
4646

47-
### PG_URL String Format
47+
### PG_URL Environment Variable
4848

49-
Bytebase uses the standard PostgreSQL connection URI format. See the [official PostgreSQL documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS) for complete details.
49+
The `PG_URL` environment variable configures the PostgreSQL connection for Bytebase. You can set it in two ways:
50+
51+
#### Direct Connection String
52+
Set `PG_URL` directly to a PostgreSQL connection URI:
53+
```bash
54+
PG_URL="postgresql://bytebase:[email protected]:5432/bytebase"
55+
```
56+
57+
#### File Path (Kubernetes & Secret Management)
58+
For Kubernetes deployments and secret manager integration, set `PG_URL` to a file path containing the connection string. Bytebase automatically picks up the updated connection string when the file content changes, enabling seamless secret rotation.
59+
```bash
60+
PG_URL="/path/to/connection/file"
61+
```
62+
63+
The connection string must follow the standard PostgreSQL URI format. See the [official PostgreSQL documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS) for complete syntax details.
5064

5165
**Example:**
5266

0 commit comments

Comments
 (0)