Skip to main content

Database

Norish stores everything in PostgreSQL. Point it at your database with a single DATABASE_URL:

docker-compose.yml (environment)
DATABASE_URL: postgres://postgres:norish@db:5432/norish
VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgres://user:pass@db:5432/norish

Composing the URL from parts

If DATABASE_URL is not set, Norish composes it from the component variables below. Use this only if you intentionally prefer split variables over a single URL.

When no component vars are set either, the fallback URL is postgresql://postgres:norish@localhost:5432/norish.

VariableDescriptionDefault
DATABASE_HOSTPostgreSQL hostlocalhost
DATABASE_PORTPostgreSQL port5432
DATABASEDatabase namenorish
DATABASE_USERDatabase usernamepostgres
DATABASE_PASSWORDDatabase passwordnorish
tip

For local development the default is a direct URL in .env.local, typically postgres://postgres:norish@localhost:5432/norish.