Pre-existing database

Even though there were four ways to install pREST there’s mostly two ways to run it.

  1. With the binary or homebrew or go install
  2. With Docker or Docker Compose

With the binary or homebrew or go install

If you install pREST by downloading the binary or using Homebrew or using go install, you must pass the necessary variables binary as follows:

PREST_PG_USER=postgres \
prestd # Binary installed

With docker

Considering you already did the pull in the previous step:

docker run -e PREST_HTTP_PORT=3000 \
	-e PREST_PG_USER=postgres \
	-e PREST_PG_PASS=pass \

if you want to connect to a database running on the host machine you can add --network host param.

or if use Docker Compose (there’s an example in the repository)

docker-compose up

For more details on how to configure and other environment variables got to Configurations