docbrown/docs/getting-started/config-env.md
Josh Puetz d47d02f090
[deploy] Log in with Facebook (#9922)
* First draft of facebook auth

* Add Facebook welcome broadcast to seeds, data script

* Tests!

* Documentation

* Update docs with pictures

* User siteconfig/app config

* Adjust dropdown menu width to avoid wrap for Facebook button

* Add Facebook auth keys to SiteConfig properly

* Remove unnecessary VCR cassette

* Add omniauth facebook gem to vendor cache

* Use uid instead of email for nickname randomization

* Test fix, test for missing email in Facebook

* Update docs/backend/auth-facebook.md

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Typo fix!

* Don't default facebook auth settings to ApplicationConfig

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-26 12:04:20 -04:00

1.3 KiB

title
Configuring Environment Variables

Configuring environment variables and secret keys

Take a look at Envfile. This file lists all the ENV variables we use and provides a fake default for any missing keys.

The backend guide will show you how to get free API keys for additional services that may be required to run certain parts of the app.

To set up keys for your local instance of Forem, you'll need to create an .env file. You can do this by copying the file called .env_sample in the app's main directory:

cp .env_sample .env

Then, add each key you need to the .env file. For example, if you're setting up Cloudinary:

export CLOUDINARY_API_KEY="SOME_REAL_SECURE_KEY_HERE"
export CLOUDINARY_API_SECRET="ANOTHER_REAL_SECURE_KEY_HERE"
export CLOUDINARY_CLOUD_NAME="A_CLOUDINARY_NAME"

(Don't worry, your .env file is ignored by git)

If you are missing ENV variables when you boot your application you will see a warning message in your logs when you try to access that variable Unset ENV variable: xyz.

Only certain features require "real" keys, so you may be able to add them as you work on different areas of the application.