A gokrazy appliance that runs PostgreSQL 17 (Alpine) in a podman container. PostgreSQL listens only on a Unix socket — no TCP, no exposed ports.
On startup the program:
- Creates
/perm/postgres-data(survives reboots) and/run/postgresql(socket dir) - Removes any leftover container from a previous boot
- Pulls
docker.io/library/postgres:17-alpine(cached after the first pull) - Starts the container with
--network none, mounting both directories - Polls the Unix socket until PostgreSQL is ready
- Blocks until
SIGTERM/SIGINT, then runspodman stop --time 10for a clean shutdown
Environment variables prefixed with POSTGRES_ are forwarded to the container.
Any value starting with file: is replaced by the contents of that file, keeping secrets off the command line:
POSTGRES_USER=miniflux
POSTGRES_PASSWORD=file:/perm/secrets/pg-password
POSTGRES_DB=miniflux
| Flag | Default | Description |
|---|---|---|
-image |
docker.io/library/postgres:17-alpine |
Container image to pull and run |