diff --git a/.env.sample b/.env.sample new file mode 100644 index 00000000..cb16b3d6 --- /dev/null +++ b/.env.sample @@ -0,0 +1,6 @@ +SECRET_KEY_BASE="big long secret that you can create using 'rake secret'" +SMTP_USER_NAME="username" +SMTP_PASSWORD="this_is_not_the_password" +SMTP_ADDRESS="somedomain.com" +SMTP_DOMAIN="somedomain.com" +SMTP_PORT="465" diff --git a/Gemfile b/Gemfile index 8bb0be8f..bc52f1f3 100644 --- a/Gemfile +++ b/Gemfile @@ -46,7 +46,7 @@ gem 'pdf-inspector', require: 'pdf/inspector' gem 'log4r' # Load ENV from a `.env` file` -gem 'dotenv' +gem 'dotenv-rails' # Automatically create text emails from HTML ones gem 'premailer-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 3b214889..2c4b198d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,6 +70,9 @@ GEM addressable diff-lcs (1.2.5) dotenv (2.1.2) + dotenv-rails (2.1.2) + dotenv (= 2.1.2) + railties (>= 3.2, < 5.1) erubis (2.7.0) execjs (2.7.0) factory_girl (4.8.0) @@ -299,6 +302,7 @@ DEPENDENCIES carrierwave country_select dotenv + dotenv-rails execjs factory_girl_rails faker @@ -329,4 +333,4 @@ DEPENDENCIES uglifier (>= 1.3.0) BUNDLED WITH - 1.15.3 + 1.16.0 diff --git a/README.md b/README.md index ca43722c..5a06aae0 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,7 @@ If you are running this project in production you'll need to set environment var ## Email Setup -If you're using SMTP to send emails, set the required ENV variables in config/secrets.yml or create a hidden file /[your repo]/.env (and do not add it to the repository) that overrides the values you want to set like so: - -```sh -SMTP_PASSWORD='this_is_not_the_password' -# ... more values as you need -``` +If you're using SMTP to send emails, create a hidden file `.env` (it is already ignored by git) that overrides the values you want to set. See `.env.sample` for an example. ## Event-Specific Setup (do this every year)