diff --git a/config/environments/production.rb b/config/environments/production.rb index cb4aed0..7117d2f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,7 +22,7 @@ Rails.application.configure do # config.asset_host = "http://assets.example.com" # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :amazon + config.active_storage.service = ENV["RAILS_BUILD"] ? :build : :amazon # Assume all access to the app is happening through a SSL-terminating reverse proxy. config.assume_ssl = true diff --git a/config/storage.yml b/config/storage.yml index f0c3c9a..4dedeb4 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -6,6 +6,10 @@ local: service: Disk root: <%= Rails.root.join("storage") %> +build: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) # amazon: # service: S3