This app expects configuration to be provided via environment variables.
| Key | Description | Optional | Default | Notes |
|---------------|------------------------------------------------------------------|--------------------------|------------|----------------------------|
| PORT
| The Port the service will listen on (required for GCP Cloud Run) | ✔️ | "8080" | |
| DB_PORT
| The port to connect to the database to | ✔️ | "5432" | |
| DB_HOST
| the database host | ✖️ | na | |
| DB_NAME
| The database name | ✔️ | "dpgraham" | |
| DB_PASSWORD
| The database password | ✖️ | na | |
| DB_USER
| The database username | ✖️ | na | |
| GIN_MODE
| The GIN framework mode of operations | ✔️ | "Release" | gin has exported constants |
The app comes with series of configuration files that can be used to set the environment variables. These files are
located in the ./configs
directory. The files can be sourced from a bash terminal using the source
command.
source ./configs/dev.env
The run.sh
shell script will start a local postgres database using docker (compose). The shell script uses the
configurations in the ./configs/dev.env
file to configure the database. See run.sh.