ci / Compose (pull_request) Successful in 26s
ci / Workflows (pull_request) Successful in 18s
ci / Shell (pull_request) Successful in 52s
ci / Formatting (pull_request) Successful in 27s
ci / Python and tests (pull_request) Successful in 8s
ci / YAML (pull_request) Successful in 17s
ci / Dockerfiles (pull_request) Successful in 13s
ci / Kubernetes (pull_request) Successful in 12s
ci / image-plan (pull_request) Skipped
ci / Image (${{ matrix.name }}) (pull_request) Skipped
ci / build (pull_request) Skipped
37 lines
2.0 KiB
Markdown
37 lines
2.0 KiB
Markdown
# Shared PostgreSQL
|
|
|
|
This directory contains the shared PostgreSQL 17 deployment for Authentik,
|
|
Gitea, NetBox, Netronome, Paperless-ngx, and Statuspage. It creates one database
|
|
and one login role per service. Per-service standalone databases were removed
|
|
after the migration (Sep 2026); Penpot stays on its own compose PostgreSQL
|
|
(archived, not part of the shared instance).
|
|
|
|
## Compatibility baseline
|
|
|
|
| Service | Current application | Shared PostgreSQL 17 |
|
|
| ------------- | ------------------- | -------------------------------------- |
|
|
| Authentik | 2025.10.x | Supported (Authentik requires 14+) |
|
|
| Gitea | 1.27.3 | Supported (Gitea requires 12+) |
|
|
| NetBox | 4.7.x | Supported (NetBox 4.x requires 13+) |
|
|
| Netronome | 0.14.0 | Supported (upstream's example uses 17) |
|
|
| Paperless-ngx | 3.2.1 | Supported |
|
|
| Statuspage | custom | Supported |
|
|
|
|
A major-version change must use a logical dump/restore; changing only the
|
|
image tag while keeping a data directory is not supported.
|
|
|
|
For Compose, copy `.env.example` to `.env`, set all passwords, and start it with
|
|
`docker compose -f shared-compose.yaml up -d`. This file is intentionally not
|
|
named `compose.yaml`, so the repository deploy workflow does not start a second
|
|
database accidentally.
|
|
Applications that use this database must also join that external network and use
|
|
`homelab-postgres:5432`.
|
|
|
|
For Kubernetes, create `k8s/secrets.yaml` from the example before applying the
|
|
manifests. The `k8s/active` marker makes the normal deploy workflow include the
|
|
namespace, StatefulSet, ConfigMap, and NetworkPolicy. Applications use
|
|
`postgres.database.svc.cluster.local:5432`.
|
|
Migrate each existing database with a tested logical dump/restore before
|
|
switching an application. Do not reuse a PostgreSQL 14 or 17 data directory
|
|
with PostgreSQL 15.
|