Skip to content

postgresql

Version 2026.247.0100
Repo box/github.com/opencharly/pod-postgresql:v2026.247.1304

A Docker-compatible PostgreSQL server that self-initializes its cluster and accepts client connections. Installs the PostgreSQL server (postgres, initdb, pg_ctl), the psql client + pg_isready readiness probe, and the pgvector similarity-search extension. A generated entrypoint wrapper (/usr/local/bin/postgresql-entrypoint.sh) performs first-run initdb, database creation, password handling, and /docker-entrypoint-initdb.d processing, then execs the server on a unix socket under ~/.postgresql listening on 127.0.0.1:5432. ROOT-CAPABLE: root-posture boxes re-exec the body under the distro’s postgres OS user (runuser) after preparing the declared data/socket dirs — initdb refuses root; uid-1000 boxes are unchanged. Every behaviour below is observable: the binaries on disk, the executable entrypoint, and a live server whose cluster was initialized and that answers pg_isready. Deploy-scope steps stay auth-independent so the scenario holds for every box composing this candy (consumers such as immich override POSTGRES_USER/POSTGRES_DB).

  • postgresql

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run command=mkdir -p /home/user/.postgresql chown 1000:1000 /home/user/.postgresql mkdir -p /docker-entrypoint-initdb.d
run write=/usr/local/bin/postgresql-entrypoint.sh
check the PostgreSQL server binary is installed
check the psql client binary is installed
check the initdb cluster-bootstrap tool is installed
check the pg_isready readiness probe is installed
check the Docker-compatible entrypoint wrapper is present and executable
check the pgvector similarity-search extension package is installed
check the entrypoint initialized the cluster data directory on first run
check the running server reports ready on its unix socket
check package=postgresql-server
check service=postgresql
check the postgres server NEVER runs as root — the root-capable branch observable effect (B12, fails without the branch — a root box then has no server or a root-user one; uid-1000 boxes run uid 1000, which passes)