There are environment variables that are required to be set in order to run tests and to run the server in general. Please set up these environment variables either in your shell or on the command line.
We use a specific implementation of environment variables that are accessible to the applications' cloud.gov-deployed environment through a variable called VCAP_SERVICES
. These services are individually defined and must be bound to the application via the manifests located in the .cg-deploy
directory. The services are available at the space
level within cloud.gov, but the bindings are application specific. I.e. a service would need to be bound to both the server and the frontend to be available to both. This environment variable is provided as an object and parsed in the server/vcap-constants.es6
. These services also include access keys to the s3
bucket and ci deployer keys.
These services are defined in the Forest Service Cloud Migration Repository.
To emulate the deployed environment variables we provide a list of local VCAP_SERVICES
that will be automattically pulled in.
The following environment variables are required to run the application locally, in CI, or with docker:
To set aws credentials for the purpose of connecting an s3 bucket. In order to pass end to end tests locally or on CircleCI, you must include valid s3 credentials in the AWS_CONFIG variable.
{"s3":[{"credentials":{"bucket":"","access_key_id":"","region":"us-east-1","secret_access_key":""},"label":"s3","name":"intake-s3"}]}
If AWS_CONFIG is not set, system will use the json file here
(from https://snyk.io/account)
The following environment variables are only required to run the application locally when not using docker:
postgres://<user>:<pass>@localhost:<port>/<dbname>
local
{"uris":["http://localhost:8080"]}
Note that depending on your shell, you may need to escape the quotation marks when setting this variable at the command line:
export VCAP_APPLICATION={\"uris\":[\"http://localhost:8080\"]}
To override the default VCAP_SERVICES that are configured for local development and CI.
The following environment variables are required for staging and production. In general, these will be set within cloud.gov as user-provided-services
VCAP_SERVICES
DATABASE_URL
VCAP_APPLICATION