Files
ServerKit/backend/templates/postgresql.yaml
T
Juan DenisandClaude Opus 5 640e7e827e docs(screenshots): recapture, and fix two bugs the capture exposed
Six new sections cover the pages rebuilt this round — the dashboard as it ships,
its edit mode, the widget library, the widget editor, the databases explorer and
the engine catalog drawer. 31/31 sections render.

The capture is a render smoke test, not just a picture, and it earned that here
by surfacing two real bugs that no test could see:

`SearchField` merges its `className` onto its OWN root, so `.skw-lib__search`
IS the `.sk-searchfield` element rather than a wrapper around one. The rule
styling it as a parent matched nothing, leaving the shared `flex: 1 1 240px`
in force — and inside a column-direction filter bar that 240px basis is a
HEIGHT. The widget library's search box was rendering 240px tall.

`GET /auth/me` answers `{user: {...}}`, but Databases read `.role` straight off
the envelope, so `isAdmin` was always false. Every admin got the read-only
console — and with the DDL builder now shipped, would never have seen the button
that runs a CREATE TABLE.

Also carries `postgresql.yaml`, which I left out of the extensions commit.
Without `engine.extensions: true` stock PostgreSQL is not a host for pgvector at
all; the extension tests passed only because the working tree had the change the
commit did not.

Fixture note for whoever edits these next: `/metrics/history` points are NESTED
(`cpu.percent`, `load['1m']`) and carry no network data, `/servers/available` is
a bare array, and `DeployPill` queries `/deployment-jobs` twice and sums — a
single unfiltered payload makes it claim eight running deploys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 09:59:06 -04:00

90 lines
2.4 KiB
YAML

id: postgresql
name: PostgreSQL
version: "16"
description: Standards-compliant relational database with JSONB, full-text search and a deep extension ecosystem
icon: https://serverkit.ai/imgs/template-icons/postgresql.svg
categories:
- database
- sql
website: https://www.postgresql.org
documentation: https://www.postgresql.org/docs/
# Marks this template as an installable database engine. Presence of this block
# is the ONLY thing that lists it in Databases -- there is no engine allow-list
# in Python.
engine:
family: Relational
protocol: postgresql
default_port: 5433
admin_user: postgres
admin_password_var: DB_PASSWORD
database_var: DB_NAME
port_var: PORT
bind_var: BIND_ADDRESS
unit: tables
client: psql
data_path: /var/lib/postgresql/data
# Can load database extensions -- see templates/extensions/. Whether a given
# one works still depends on the image shipping it.
extensions: true
version_var: IMAGE_TAG
versions:
- "16"
- "15"
- "14"
variables:
- name: IMAGE_TAG
type: string
default: "16"
hidden: true
description: Image tag; constrained to engine.versions by the installer
- name: PORT
type: port
# 5432 is usually taken by a PostgreSQL on the host itself.
default: "5433"
hidden: false
description: Host port to publish PostgreSQL on
- name: BIND_ADDRESS
type: string
default: 127.0.0.1
hidden: true
description: Address the port binds to. 127.0.0.1 keeps the engine private.
- name: DB_PASSWORD
type: password
length: 28
description: Password for the postgres superuser
- name: DB_NAME
type: string
default: postgres
description: Initial database to create
compose:
services:
app:
image: postgres:${IMAGE_TAG}-alpine
container_name: ${APP_NAME}
restart: unless-stopped
ports:
- "${BIND_ADDRESS}:${PORT}:5432"
environment:
# POSTGRES_PASSWORD is REQUIRED -- without it the entrypoint refuses to
# initialise unless trust auth is explicitly opted into.
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_USER: postgres
POSTGRES_DB: "${DB_NAME}"
volumes:
- postgresql-data:/var/lib/postgresql/data
volumes:
postgresql-data:
ports:
- port: "${PORT}"
protocol: postgresql
description: PostgreSQL wire protocol
requirements:
memory: 512MB
storage: 5GB