Skip to content

Commit e9c0bd1

Browse files
authored
Merge pull request #2779 from Permify/omer/helm-values-and-db-deployment-guide
docs: improve Helm config docs
2 parents 71dfd8d + a0e05ce commit e9c0bd1

4 files changed

Lines changed: 324 additions & 73 deletions

File tree

docs/mint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@
311311
"icon": "cloud-arrow-up",
312312
"pages": [
313313
"setting-up/installation/intro",
314+
"setting-up/installation/database",
314315
"setting-up/installation/aws",
315316
"setting-up/installation/brew",
316317
"setting-up/installation/container",
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Database Configuration
3+
---
4+
5+
For production deployments, run Permify with PostgreSQL instead of in-memory storage.
6+
7+
## Production Default: Pgcat
8+
9+
For multi-replica Permify deployments, use pgcat in session mode and connect Permify through pgcat.
10+
11+
```yaml
12+
database:
13+
engine: postgres
14+
writer:
15+
uri: postgresql://postgres:DB_PASSWORD@pgcat:6432/permify?plan_cache_mode=force_custom_plan&default_query_exec_mode=cache_describe
16+
reader:
17+
uri: postgresql://postgres:DB_PASSWORD@pgcat:6432/permify?plan_cache_mode=force_custom_plan&default_query_exec_mode=cache_describe
18+
max_connections: 1
19+
min_connections: 0
20+
```
21+
22+
See full setup guide: [Database Pooling with Pgcat](/setting-up/installation/pooling)
23+
24+
## Supported PostgreSQL versions
25+
26+
- PostgreSQL `13.8+` is supported.
27+
- Permify validates PostgreSQL version during startup and returns an error for older versions.
28+
29+
For Watch API usage, also enable:
30+
31+
- `track_commit_timestamp = on`
32+
- See Watch API setup: [Watch API requirements](/api-reference/watch/watch-changes)
33+
34+
## Recommended runtime settings (direct Postgres)
35+
36+
```yaml
37+
database:
38+
engine: postgres
39+
uri: postgresql://postgres:DB_PASSWORD@postgres:5432/permify?sslmode=require
40+
auto_migrate: true
41+
max_connections: 20 # typical range: 15-25, tune to DB limits and workload
42+
min_connections: 2 # typical range: 1-3
43+
max_connection_lifetime: 30m
44+
max_connection_idle_time: 5m
45+
```
46+
47+
## Related guides
48+
49+
- [Database Pooling with Pgcat](/setting-up/installation/pooling)
50+
- [Watch API requirements](/api-reference/watch/watch-changes)
51+
- [Configuration reference](/setting-up/configuration)

0 commit comments

Comments
 (0)