Browse Source

Fine adjustments from lots of testing.

Jonathan Rosenbaum 3 years ago
parent
commit
cd98441fd4
  1. 1
      .gitignore
  2. 20
      config/app_config.yml
  3. 1
      config/environments/production.rb
  4. 3
      docker-compose.yml

1
.gitignore

@ -81,4 +81,3 @@ brakeman.html
/config/settings/local.rb /config/settings/local.rb
/nbproject/private/ /nbproject/private/
/config/database.yml /config/database.yml
/config/app_config.yml

20
config/app_config.yml

@ -0,0 +1,20 @@
default: &default
smtp_address: ENV['SMTP_ADDRESS']
smtp_domain: ENV['SMTP_DOMAIN']
smtp_port: ENV['SMTP_PORT']
smtp_user_name: ENV['SMTP_USER_NAME']
smtp_password: ENV['SMTP_PASSWORD']
smtp_ssl: ENV['SMTP_SSL']
default_url: ENV['DEFAULT_URL']
development:
<<: *default
test:
<<: *default
preview:
<<: *default
production:
<<: *default

1
config/environments/production.rb

@ -84,6 +84,7 @@ BikeBike::Application.configure do
address: config.app_config['smtp_address'], address: config.app_config['smtp_address'],
domain: config.app_config['smtp_domain'], domain: config.app_config['smtp_domain'],
port: config.app_config['smtp_port'], port: config.app_config['smtp_port'],
ssl: config.app_config['smtp_ssl'],
authentication: :plain, authentication: :plain,
enable_starttls_auto: true, enable_starttls_auto: true,
openssl_verify_mode: 'none', openssl_verify_mode: 'none',

3
docker-compose.yml

@ -50,13 +50,14 @@ services:
# Add your own environment values in .env, or use the default ones # Add your own environment values in .env, or use the default ones
environment: environment:
- PORT=3000 - PORT=3000
- RAILS_ENV=${RAILS_ENV:-production}
- DATABASE_URL=${DATABASE_URL:-postgresql://bike_bike:password@db/bike_bike?encoding=unicode&pool=5} - DATABASE_URL=${DATABASE_URL:-postgresql://bike_bike:password@db/bike_bike?encoding=unicode&pool=5}
- RAILS_ENV=${RAILS_ENV:-production rails assets:precompile.log}
- SMTP_ADDRESS=${SMTP_ADDRESS:-fake-smtp.bikebike.org} - SMTP_ADDRESS=${SMTP_ADDRESS:-fake-smtp.bikebike.org}
- SMTP_DOMAIN=${SMTP_DOMAIN:-bikebike.org} - SMTP_DOMAIN=${SMTP_DOMAIN:-bikebike.org}
- SMTP_PORT=${SMTP_PORT:-587} - SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER_NAME=${SMTP_USER_NAME:-info@bikebike.org} - SMTP_USER_NAME=${SMTP_USER_NAME:-info@bikebike.org}
- SMTP_PASSWORD=${SMTP_PASSWORD:-fake} - SMTP_PASSWORD=${SMTP_PASSWORD:-fake}
- SMTP_SSL=${SMTP_SSL:-false}
- DEFAULT_URL=${DEFAULT_URL:-bikebike.org} - DEFAULT_URL=${DEFAULT_URL:-bikebike.org}
volumes: volumes:
- bikebikebike:/app/BikeBike - bikebikebike:/app/BikeBike

Loading…
Cancel
Save