bootstrap/specs/postgres/template
Joshua Potter ac84906dad Prefer $PWD/data over $PGDATA.
Include additional `.gitignore` rules to phoenix spec.
2023-11-28 10:56:18 -07:00
..
.envrc Add postgres spec. 2023-11-26 15:44:53 -07:00
.gitignore Initialize database clusters on bootstrap. 2023-11-28 10:29:42 -07:00
README.md Prefer $PWD/data over $PGDATA. 2023-11-28 10:56:18 -07:00
default.nix Add postgres spec. 2023-11-26 15:44:53 -07:00
flake.lock Add `flake.lock` to postgres spec. 2023-11-27 04:59:42 -07:00
flake.nix Add postgres spec. 2023-11-26 15:44:53 -07:00

README.md

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