-
Notifications
You must be signed in to change notification settings - Fork 1
API Configuration
Andy Lo edited this page May 8, 2018
·
4 revisions
The .env
file provides important configuration data that the API needs to operate as environment variables.
For further information on PostgreSQL environment variables, please see the official documentation.
-
DATABASE_URL
: To understand how to construct a value for this configuration variable, please refer to the libpq connection string documentation. -
PGUSER
: This is the username credential to be used to authenticate against PostgreSQL. For local development environments, this is oftenpostgres
by default. -
PGPASSWORD
: This is the user password credential to the used to authenticate against PostgreSQL. -
PGHOST
: This is the address of the PostgreSQL server you wish to connect to. For local development servers, this is oftenlocalhost
by default. -
PGPORT
: This is the listening port of the PostgreSQL server you wish to connect to. For all PostgreSQL servers with default configurations, this should be the common value5432
. -
PGDATABASE
: This is the name of the database you wish to connect to. Please refer to the official PostgreSQL documentation for a description of database versus schema in PostgreSQL. -
PGSSLMODE
: This sets whether or not to attempt SSL connections. For local development servers, this will most likely bedisable
. -
FOREST_AUTH_SECRET
: The authentication secret to be used when communicating with Forest. If you are not using Forest, please set to a random value. -
FOREST_ENV_SECRET
: The authentication secret that identifies the project environment (in Forest) the API is running on. If you are not using Forest, please set to a random value; the API will complain on startup, but the warning can be ignored. -
SSL_DATABASE
: This specifies to Forest whether an SSL connection should be used. If you are not using Forest, just set tofalse
. -
DATABASE_SCHEMA
: This is the PostgreSQL schema that the API should be configured to use. For this project, the default should besdg
. -
AWS_ACCESS_KEY_ID
: This is the AWS Access Key ID for the IAM user. -
AWS_SECRET_ACCESS_KEY
: This is the AWS Secret Access Key for the IAM user. -
AWS_REGION
: This is the AWS region that the API will look for services under. -
S3_BUCKET
: This is the S3 bucket that will store featured images for resources. -
RECEIVE_CONTACT_FORM_EMAILS
: This is the e-mail address to receive processed contact form data. -
RECEIVE_RESOURCE_FORM_EMAILS
: This is the e-mail address to receive processed resource submission data. -
ALERT_SENDER_EMAIL
: This is the automated sender e-mail address that the API should mark as from. -
SITE_URL
: This is the URL of the SDG National Reporting Initiative website. For a local development environment, the default Jekyll server runs onhttp://localhost:4000/
.