Infra

Your own Postgres

Docker only runs the bundled Postgres on port 5440; the app itself just needs a Postgres it can reach. To use one you already run, point the app at it. The role needs CREATEDB, or create the databases first.

Development

export BLOG_DATABASE_URL='postgres://USER:PASSWORD@localhost:5432/blog_development?sslmode=disable'
bogie db:prepare
bogie s

To keep the URL out of your shell, set database_url with bogie credentials:edit instead. See Configuration and credentials.

Tests

Tests never read the credentials or BLOG_DATABASE_URL, so a test run can never truncate development data. They take their own URL:

export BLOG_TEST_DATABASE_URL='postgres://USER:PASSWORD@localhost:5432/blog_test?sslmode=disable'
BLOG_ENV=test bogie db:prepare
bogie test

What still uses Docker

make up, make down, make psql and the database step of bin/ci (docker compose up) still expect the Compose stack.