bootstrap/specs/postgres/template/README.md

682 B

Postgres Flake Template

This is a template for constructing a working environment for local Postgres (version 15.5) usage. direnv can be used to a launch a dev shell upon entering this directory (refer to .envrc). Otherwise run via:

$> nix develop

Quickstart

An empty Postgres cluster is initialized at /data. To start the database, run the following:

$> pg_ctl start -o --unix_socket_directories="$PWD/data"

To shut the database down, run:

$> pg_ctl stop

You can connect to this database from the project root directory by running:

$> psql -h "$PWD/data" -d postgres