infrastructure/skills/postgresql/SKILL.md
PostgreSQL database server on port 5432 with pgvector extension and persistent data. Entrypoint supports POSTGRES_SHARED_PRELOAD_LIBRARIES for extension loading. Use when working with PostgreSQL, database configuration, or pgvector.
npx skillsauth add overthinkos/overthink-plugins postgresqlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Property | Value |
|----------|-------|
| Dependencies | none |
| Ports | 5432 |
| Volumes | pgdata -> ~/.postgresql/data |
| Service | postgresql (supervisord, priority 10) |
| Install files | task: |
| Variable | Value |
|----------|-------|
| PGDATA | ~/.postgresql/data |
| POSTGRES_HOST_AUTH_METHOD | scram-sha-256 |
| POSTGRES_SHARED_PRELOAD_LIBRARIES | (optional) — comma-separated .so names loaded at startup |
The entrypoint also reads these variables (with defaults, not set in charly.yml):
POSTGRES_USER (default: postgres) — set by consuming candies (e.g., immich sets immich)POSTGRES_DB (default: $POSTGRES_USER) — set by consuming candiesPOSTGRES_PASSWORD — required unless POSTGRES_HOST_AUTH_METHOD=trust| Variable | Template Value | Resolved Example |
|----------|---------------|-----------------|
| PGHOST | {{.ContainerName}} | charly-postgresql |
| PGPORT | 5432 | 5432 |
Pod-aware: same-container consumers receive PGHOST=localhost, cross-container consumers receive PGHOST=charly-postgresql. When charly config runs, these are automatically injected into the global charly.yml env for PostgreSQL service discovery.
See /charly-image:layer for env_provide field docs.
The candy is multi-distro:
postgresql-server, postgresql-contrib, pgvector (vector similarity search extension)postgresql, postgresql-libs — the Arch postgresql package ships the server + contrib tooling; pgvector on Arch is built from the AUR (see /charly-infrastructure:vectorchord).# charly.yml -- typically used as dependency of immich
my-image:
candy:
- postgresql
/charly-immich:immich/charly-immich:immich-mlThe custom entrypoint (/usr/local/bin/postgresql-entrypoint.sh) supports:
initdb, database creation, and /docker-entrypoint-initdb.d/ scriptsPOSTGRES_PASSWORD or POSTGRES_PASSWORD_FILEPOSTGRES_SHARED_PRELOAD_LIBRARIES — when set, adds -c shared_preload_libraries=... to both the init-phase temp server and the final exec. Used by the vectorchord candy to load vchord.so. Generic mechanism — any extension candy can use it./charly-immich:immich -- primary consumer (depends on postgresql)/charly-infrastructure:vectorchord -- sets POSTGRES_SHARED_PRELOAD_LIBRARIES=vchord.so/charly-infrastructure:redis -- often paired with postgresql in service stacks/charly-core:charly-config — Deploy with secrets provisioning (db-password)/charly-build:secrets — Manage database credentialsUse when the user asks about:
PGDATA configuration/charly-check:check — declarative testing (check: block, charly check box, charly check live)tools
Use when authoring or modifying a charly PLUGIN — a candy with a `plugin:` block that contributes Providers (verbs/kinds/deploy-targets/steps/builders/commands), its own CUE schema, builtin (compiled-in) or external (out-of-tree git repo). Covers the unified Provider model, the per-plugin CUE-schema contract (single source → Go params for dev + schema-over-Describe RPC for runtime), the SDK, and the loader.
tools
The CUE data-validation / configuration CLI (cue), pinned to v0.16.1. Use when working with the cue candy, installing the cue binary into a box or onto a target:local dev host, or running the offline schema-vendoring pipeline that feeds charly's egress validation.
tools
CUE EGRESS validation — validating (and, where it adds value, generating) the config files charly WRITES to a system BEFORE the bytes hit disk. MUST be invoked before working on charly/egress.go, the vendored schemas under candy/plugin-egress/egress-schemas/vendor/, the ValidateEgress / registerVendoredEgressKind path, the offline `task cue:vendor` pipeline, or adding an egress schema for any written artifact (cloud-init, k8s manifests, traefik routes, runtime config, install ledger, systemd/quadlet units, ssh_config, libvirt XML).
tools
Kubernetes cluster-probe declarative check verb — the `kube:` check verb (nodes, pods, ingress, storage class, addon health, apply/delete, and arbitrary resource GETs) served out-of-process by the candy/plugin-kube plugin (vendored client-go; no external kubectl required).