Skip to main content

Database

Set DATABASE_URL to connect to PostgreSQL:

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, the connection uses the variables below. With none set, it defaults to postgresql://postgres:norish@localhost:5432/norish.

VariableDescriptionDefault
DATABASE_HOSTPostgreSQL hostlocalhost
DATABASE_PORTPostgreSQL port5432
DATABASEDatabase namenorish
DATABASE_USERDatabase usernamepostgres
DATABASE_PASSWORDDatabase passwordnorish