This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/config/application.rb

54 lines
2.2 KiB
Ruby
Raw Normal View History

2018-06-26 10:29:46 -04:00
# frozen_string_literal: true
2018-05-07 16:06:01 -04:00
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Greenlight
2018-05-07 16:06:01 -04:00
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
2018-06-11 17:32:08 -04:00
# Use custom error routes.
2018-06-26 10:29:46 -04:00
config.exceptions_app = routes
2018-06-11 13:05:54 -04:00
config.loadbalanced_configuration = ENV["LOADBALANCER_ENDPOINT"].present? && ENV["LOADBALANCER_SECRET"].present?
2018-07-09 13:17:23 -04:00
# The default callback url that bn launcher will redirect to
config.gl_callback_url = ENV["GL_CALLBACK_URL"]
2018-07-04 15:24:01 -04:00
# Setup BigBlueButton configuration.
if config.loadbalanced_configuration
# Fetch credentials from a loadbalancer based on provider.
config.loadbalancer_endpoint = ENV["LOADBALANCER_ENDPOINT"]
config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"]
config.launcher_secret = ENV["LAUNCHER_SECRET"]
2018-07-04 15:24:01 -04:00
else
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
config.bigbluebutton_endpoint_default = "http://test-install.blindsidenetworks.com/bigbluebutton/api/"
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
# Use standalone BigBlueButton server.
config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"]
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"]
# Fallback to testing credentails.
if config.bigbluebutton_endpoint.blank?
config.bigbluebutton_endpoint = config.bigbluebutton_endpoint_default
config.bigbluebutton_secret = config.bigbluebutton_secret_default
end
# Fix endpoint format if required.
config.bigbluebutton_endpoint += "api/" unless config.bigbluebutton_endpoint.ends_with?('api/')
end
2018-05-11 15:57:31 -04:00
# Determine if GreenLight should allow non-omniauth signup/login.
2018-06-11 17:32:08 -04:00
config.allow_user_signup = (ENV['ALLOW_GREENLIGHT_ACCOUNTS'] == "true")
# Configure custom banner message.
config.banner_message = ENV['BANNER_MESSAGE']
2018-05-07 16:06:01 -04:00
end
2018-07-04 15:24:01 -04:00
end