Skip to main content

Database

Norish stores its data in PostgreSQL. Set the connection with DATABASE_URL:

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

Separate variables

Without DATABASE_URL, Norish builds the URL from the variables below. With none of them set, it uses postgresql://postgres:norish@localhost:5432/norish.

VariableDescriptionDefault
DATABASE_HOSTPostgreSQL hostlocalhost
DATABASE_PORTPostgreSQL port5432
DATABASEDatabase namenorish
DATABASE_USERDatabase usernamepostgres
DATABASE_PASSWORDDatabase passwordnorish