about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/database.yml9
-rw-r--r--config/environments/production.rb4
2 files changed, 7 insertions, 6 deletions
diff --git a/config/database.yml b/config/database.yml
index 8914ab16d..259244e6f 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -17,7 +17,8 @@ test:
 
 production:
   <<: *default
-  database: postgres
-  username: postgres
-  password:
-  host: db
+  database: <%= ENV['DB_NAME'] || 'mastodon_production' %>
+  username: <%= ENV['DB_USER'] || 'mastodon' %>
+  password: <%= ENV['DB_PASS'] || '' %>
+  host: <%= ENV['DB_HOST'] || 'localhost' %>
+  port: <%= ENV['DB_PORT'] || 5432 %>
diff --git a/config/environments/production.rb b/config/environments/production.rb
index b0236d09e..1f08fad5a 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -22,7 +22,7 @@ Rails.application.configure do
 
   # Disable serving static files from the `/public` folder by default since
   # Apache or NGINX already handles this.
-  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
+  config.serve_static_files = true
 
   # Compress JavaScripts and CSS.
   config.assets.js_compressor = :uglifier
@@ -42,7 +42,7 @@ Rails.application.configure do
   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
 
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
-  # config.force_ssl = true
+  config.force_ssl = ENV['LOCAL_HTTPS'] == 'true'
 
   # Use the lowest log level to ensure availability of diagnostic information
   # when problems arise.