Configure Active Storage
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -40,3 +40,4 @@ public/assets/
|
|||||||
public/machine_learning/data/
|
public/machine_learning/data/
|
||||||
public/system/
|
public/system/
|
||||||
/public/ckeditor_assets/
|
/public/ckeditor_assets/
|
||||||
|
storage/
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ module Consul
|
|||||||
# Handle custom exceptions
|
# Handle custom exceptions
|
||||||
config.action_dispatch.rescue_responses["FeatureFlags::FeatureDisabled"] = :forbidden
|
config.action_dispatch.rescue_responses["FeatureFlags::FeatureDisabled"] = :forbidden
|
||||||
|
|
||||||
|
# Store files locally.
|
||||||
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||||
# config.time_zone = 'Central Time (US & Canada)'
|
# config.time_zone = 'Central Time (US & Canada)'
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ set :pty, true
|
|||||||
set :use_sudo, false
|
set :use_sudo, false
|
||||||
|
|
||||||
set :linked_files, %w[config/database.yml config/secrets.yml]
|
set :linked_files, %w[config/database.yml config/secrets.yml]
|
||||||
set :linked_dirs, %w[.bundle log tmp public/system public/assets public/ckeditor_assets public/machine_learning/data]
|
set :linked_dirs, %w[.bundle log tmp public/system public/assets public/ckeditor_assets public/machine_learning/data storage]
|
||||||
|
|
||||||
set :keep_releases, 5
|
set :keep_releases, 5
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ Rails.application.configure do
|
|||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
|
# Store files in tmp folders.
|
||||||
|
config.active_storage.service = :test
|
||||||
|
|
||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
|
|
||||||
config.after_initialize do
|
config.after_initialize do
|
||||||
|
|||||||
7
config/storage.yml
Normal file
7
config/storage.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
local:
|
||||||
|
service: Disk
|
||||||
|
root: <%= Rails.root.join("storage") %>
|
||||||
|
|
||||||
|
test:
|
||||||
|
service: Disk
|
||||||
|
root: <%= Rails.root.join("tmp/storage") %>
|
||||||
Reference in New Issue
Block a user