Sha256: ecd61b7c85f2ed32a8c36991f046bb874dfa00f9d67cd12788cb6393031f1594

Contents?: true

Size: 974 Bytes

Versions: 34

Compression:

Stored size: 974 Bytes

Contents

# Do things here that you only want to apply to your docker environment
#
if ENV['DOCKER'].to_s =~ /true/
  #
  # Modify workarea configuration
  #
  Workarea.configure do |config|
    config.headless_chrome_options << 'no-sandbox'
  end

  #
  # Modify application configuration
  #
  Rails.application.configure do
    <%= 'config.file_watcher = ActiveSupport::FileUpdateChecker' unless include_docker_sync? %>

    # Uncomment if you want to use mailcatcher
    # config.action_mailer.delivery_method = :smtp
    # config.action_mailer.smtp_settings = { :address => 'mailcatcher', :port => 1025 }

    # Allow web console in Docker
    if Rails.env.development?
      config.web_console.whitelisted_ips = Socket.ip_address_list.reduce([]) do |res, addrinfo|
        addrinfo.ipv4? ? res << IPAddr.new(addrinfo.ip_address).mask(24) : res
      end
      WebConsole::Request.whitelisted_ips = WebConsole::Whitelist.new(config.web_console.whitelisted_ips)
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-core-3.4.45 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.44 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.43 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.42 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.41 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.40 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.39 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.38 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.37 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.36 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.35 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.34 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.33 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.32 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.31 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.30 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.29 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.28 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.27 lib/generators/workarea/docker/templates/docker_init.rb.erb
workarea-core-3.4.26 lib/generators/workarea/docker/templates/docker_init.rb.erb