-
Notifications
You must be signed in to change notification settings - Fork 22
Environment Variables
The environment variables below are required in order to run the movement on Purpose Platform locally. A common practice is to put them in a .env file with 'export' commands, such as export MOVEMENT_ID=movement-name
. Source the .env file before starting the server, or just start the server with foreman which loads .env by default.
PLATFORM_BASE_URI=http://localhost:5000/api
- Used to spin up a movement server from a cucumber scenario.
PLATFORM_BASE_URI=http://localhost:5000/api
- api endpoint
MOVEMENT_ID=movement-name
MOVEMENT_NAME=Movement Name
SENDGRID_PASSWORD
SENDGRID_USERNAME
- Credentials for sendgrid account used for sending platform admin administration emails (admin creation/password change).
[MOVEMENT-SLUG]_BLAST_EMAIL_DOMAIN
[MOVEMENT-SLUG]_BLAST_EMAIL_PASSWORD
[MOVEMENT-SLUG]_BLAST_EMAIL_USERNAME
- Sendgrid credentials for account used for blasting.
-
[MOVEMENT-SLUG] is the name of the movement in uppercase with all spaces removed.
- For example 'Test Movement' (the MOVEMENT_NAME environment var set in the movement app) becomes 'TESTMOVEMENT'.
- therefore the full variable would be: TESTMOVEMENT_BLAST_EMAIL_DOMAIN
[MOVEMENT-SLUG]_TARGET_EMAIL_DOMAIN
[MOVEMENT-SLUG]_TARGET_EMAIL_PASSWORD
[MOVEMENT-SLUG]_TARGET_EMAIL_USERNAME
- Sendgrid credentials for account used for 'target decision-maker' petition emails.
-
[MOVEMENT-SLUG] is the name of the movement in uppercase with all spaces removed.
- For example 'Test Movement' (the MOVEMENT_NAME environment var set in the movement app) becomes 'TESTMOVEMENT'.
- therefore the full variable would be: TESTMOVEMENT_TARGET_EMAIL_DOMAIN
JOIN_EMAIL_TO=[email protected]
- email address to send the api request to sendgrid with. It does not matter what you put here, it is only used to make the request to sendgrid. The recipient of the email is the user's email address.
ENABLE_UNFILTERED_BLASTING=(true/false)
- Toggles whether blasting to users with any email domain is enabled. If unset or set to false, blasts only go to emails with domains specified in the WHITELISTED_EMAIL_TEST_DOMAINS environment variable.
WHITELISTED_EMAIL_TEST_DOMAINS=(example.com,sample.com)
- Email domains that can be blasted in a non-production environment. Used to ensure that only members of the dev team are included in blasts in the staging environment.
DISABLE_SENDGRID_INTERACTION=(true/false)
- When true, doesn't send request to Sendgrid to send emails (useful for debugging blasts).
SECRET_TOKEN
- In environments other than development and test, the session secret is read from the env.
If you are using asset_sync, there are several env variables that need to be set up.
AUTHENTICATE_API_CALLS=(true/false)
- Turns on/off basic authentication of API requests.
ACTIVITY_FEED_REFRESH_FREQ=(number of seconds)
- Cache duration for activity feed.
DISABLE_MOVEMENT-SLUG_ACTIVITY_FEED=(true/false)
- Disable activity feed for a specific movement.
DISABLE_QUICK_GO=(true/false)
- Feature toggle for 'quick-go' search bar.
ENABLE_501C3_DONATIONS=(true/false)
- Feature toggle for 501C3 donations.
ENABLE_DONATION_TYPES=(true/false)
- Feature toggle for creating 501C3 and 501C4 donations.
READONLY_DATABASE_URL
- Database url to use for list cutting and blasting, in order to move the query load off of the main database.
If you are using asset_sync, there are several env variables that need to be set up.
ENABLE_ACTIVITY_FEED=(true/false)
- Feature toggle for activity feed.
MOVEMENT_BASIC_AUTH_PASSWORD
- Password for basic authentication of API calls.