OpenSourcePolitics / decidim-ditp

Decidim instance for DITP OGP
1 stars 2 forks source link

Update rails version and switch to public:true from active_storage #27

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

config.action_cable.mount_path = nil

config.action_cable.url = 'wss://example.com/cable'

config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]

config.force_ssl = true

when problems arise.

see configuration for sidekiq in config/sidekiq.yml

config.active_job.queue_name_prefix = "developmentapp#{Rails.env}"

https://api.github.com/OpenSourcePolitics/decidim-ditp/blob/7d487ee2d850a957c059b6e6e8a9e8cb1859d0ed/config/environments/production.rb#L40


  # Store uploaded files on the local file system (see config/storage.yml for options)
  config.active_storage.service = Rails.application.secrets.dig(:scaleway, :id).blank? ? :local : :scaleway

  # By default, files uploaded to Active Storage will be served from a private URL.
  # in production, you'll want to set this to :public so that files are served
  # unfortunately, this is not working with the current version of ActiveStorage
  # TODO: Update rails version and switch to public:true from active_storage
  config.active_storage.service_urls_expire_in = ENV.fetch("SERVICE_URLS_EXPIRE_IN") do
    if Rails.application.secrets.dig(:scaleway, :id).blank?
      "120000"
    else
      "1"
    end
  end.to_i.weeks

  # Mount Action Cable outside main process or domain
  # config.action_cable.mount_path = nil
  # config.action_cable.url = 'wss://example.com/cable'
  # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]

  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  config.force_ssl = ENV.fetch("FORCE_SSL", "1") == "1"

  # Use the lowest log level to ensure availability of diagnostic information
  # when problems arise.
  config.log_level = :info

  # Prepend all log lines with the following tags.
  config.log_tags = [:request_id]

  # Use a different cache store in production.
  config.cache_store = :mem_cache_store, ENV.fetch("MEMCACHE_SERVERS", "localhost:11211")

  # Use a real queuing backend for Active Job (and separate queues per environment)
  config.active_job.queue_adapter = :sidekiq
  # see configuration for sidekiq in `config/sidekiq.yml`
  # config.active_job.queue_name_prefix = "development_app_#{Rails.env}"

  config.action_mailer.perform_caching = false