Skip to content

Commit

Permalink
enable email in staging
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwoldatwork committed Apr 29, 2021
1 parent 2b2e0e6 commit d017aa3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
9 changes: 3 additions & 6 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ API_HTTP_USERNAME=username
API_HTTP_PASSWORD=password

# For AWS Simple Email Service
AWS_ACCESS_KEY_ID=YOUR-AWS-ACCESS-KEY-ID
AWS_SECRET_ACCESS_KEY=YOUR-AWS-SECRET-ACCESS-KEY
AWS_REGION=
AWS_SES_SMTP_USERNAME=
AWS_SES_SMTP_PASSWORD=
AWS_SES_ACCESS_KEY_ID=
AWS_SES_SECRET_ACCESS_KEY=
AWS_SES_REGION=

# For Docker
COMPOSE_PROJECT_NAME=touchpoints
Expand Down Expand Up @@ -61,4 +59,3 @@ [email protected]
TOUCHPOINTS_TEAM=[email protected]

INDEX_URL=https://touchpoints.digital.gov/

6 changes: 3 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
API_HTTP_USERNAME=username
API_HTTP_PASSWORD=password

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_SES_ACCESS_KEY_ID=
AWS_SES_SECRET_ACCESS_KEY=
AWS_SES_REGION=

INDEX_URL=/index

Expand Down
3 changes: 1 addition & 2 deletions config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
config.action_controller.default_url_options = { host: ENV.fetch("TOUCHPOINTS_WEB_DOMAIN") }
config.action_controller.asset_host = ENV.fetch("TOUCHPOINTS_WEB_DOMAIN")

# Temporarilty Disable Email Sending
config.action_mailer.delivery_method = :smtp
config.action_mailer.delivery_method = :ses
config.action_mailer.perform_deliveries = true
end
5 changes: 5 additions & 0 deletions config/initializers/amazon_ses.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Aws::Rails.add_action_mailer_delivery_method(:ses,
access_key_id: ENV['AWS_SES_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SES_SECRET_ACCESS_KEY'],
region: ENV['AWS_SES_REGION']
)
6 changes: 3 additions & 3 deletions manifest.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ applications:

env:
# For AWS SES (Simple Email Service)
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_REGION:
AWS_SES_ACCESS_KEY_ID:
AWS_SES_SECRET_ACCESS_KEY:
AWS_SES_REGION:

# DISABLE_DATABASE_ENVIRONMENT_CHECK: 1 # DANGEROUS!
NEW_RELIC_KEY:
Expand Down
6 changes: 3 additions & 3 deletions touchpoints-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ applications:
- name: touchpoints-demo
command: bundle exec rake cf:on_first_instance db:migrate && bundle exec rails s -b 0.0.0.0 -p $PORT -e $RAILS_ENV
env:
AWS_ACCESS_KEY_ID:
AWS_REGION:
AWS_SECRET_ACCESS_KEY:
AWS_SES_ACCESS_KEY_ID:
AWS_SES_SECRET_ACCESS_KEY:
AWS_SES_REGION:
LOGIN_GOV_CLIENT_ID: urn:gov:gsa:openidconnect.profiles:sp:sso:gsa-tts-opp:touchpoints-demo
LOGIN_GOV_IDP_BASE_URL: https://idp.int.identitysandbox.gov/
LOGIN_GOV_PRIVATE_KEY:
Expand Down
6 changes: 3 additions & 3 deletions touchpoints-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ applications:
- name: touchpoints-staging
command: bundle exec rake cf:on_first_instance db:schema:load && rake db:seed && bundle exec rails s -b 0.0.0.0 -p $PORT -e $RAILS_ENV
env:
AWS_ACCESS_KEY_ID:
AWS_REGION:
AWS_SECRET_ACCESS_KEY:
AWS_SES_ACCESS_KEY_ID:
AWS_SES_SECRET_ACCESS_KEY:
AWS_SES_REGION:
DISABLE_DATABASE_ENVIRONMENT_CHECK: 1
LOGIN_GOV_CLIENT_ID: urn:gov:gsa:openidconnect.profiles:sp:sso:gsa-tts-opp:touchpoints-staging
LOGIN_GOV_IDP_BASE_URL: https://idp.int.identitysandbox.gov/
Expand Down
6 changes: 3 additions & 3 deletions touchpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ applications:
- name: touchpoints
command: bundle exec rake cf:on_first_instance db:migrate && bundle exec rails s -b 0.0.0.0 -p $PORT -e $RAILS_ENV
env:
AWS_ACCESS_KEY_ID:
AWS_REGION:
AWS_SECRET_ACCESS_KEY:
AWS_SES_ACCESS_KEY_ID:
AWS_SES_SECRET_ACCESS_KEY:
AWS_SES_REGION:
LOGIN_GOV_CLIENT_ID: urn:gov:gsa:openidconnect.profiles:sp:sso:gsa-tts-opp:touchpoints
LOGIN_GOV_IDP_BASE_URL: https://secure.login.gov/
LOGIN_GOV_PRIVATE_KEY:
Expand Down

0 comments on commit d017aa3

Please sign in to comment.