Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (21 loc) · 1.98 KB

configuration.md

File metadata and controls

29 lines (21 loc) · 1.98 KB

Configuration

This app expects configuration to be provided via environment variables.

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 |

Config Files

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

Local Database Configuration

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.