add Dockerfile and configure production app

This commit is contained in:
Alex Turchyn
2023-06-24 22:50:12 +03:00
parent 8bb6ff7ab3
commit 8a6430f117
25 changed files with 300 additions and 193 deletions
+2
View File
@@ -6,6 +6,8 @@ ActiveSupport.on_load(:active_storage_attachment) do
has_many_attached :preview_images
end
ActiveStorage::LogSubscriber.detach_from(:active_storage) if Rails.env.production?
Rails.configuration.to_prepare do
ActiveStorage::DiskController.after_action do
response.set_header('Cache-Control', 'public, max-age=31536000') if action_name == 'show'
+3
View File
@@ -0,0 +1,3 @@
# frozen_string_literal: true
ActiveRecord::Tasks::DatabaseTasks.migrate if ENV['RAILS_ENV'] == 'production'