added demo env to registry

This commit is contained in:
olegphenomenon 2021-12-13 15:08:37 +02:00
parent 65793fbe36
commit ec59eb2be2
8 changed files with 119 additions and 0 deletions

View file

@ -8,3 +8,8 @@ production:
adapter: redis
url: redis://localhost:6379/1
channel_prefix: domain_name_registry_production
demo:
adapter: redis
url: redis://localhost:6379/1
channel_prefix: domain_name_registry_demo

View file

@ -19,6 +19,10 @@ staging:
<<: *default
database: registry_staging
demo:
<<: *default
database: registry_demo
whois_staging:
<<: *default
database: registry_whois_staging

View file

@ -29,3 +29,7 @@ whois_test:
api_log_test:
<<: *default
database: registry_api_log_test
demo:
<<: *default
database: registry_demo

View file

@ -35,3 +35,10 @@ production:
host: localhost # registry production mirror location
username: registrant_read_only
password: registrant_read_only_pwd
demo:
<<: *default
database: registry_demo # registry production mirror database name
host: localhost # registry production mirror location
username: registrant_read_only
password: registrant_read_only_pwd

View file

@ -10,6 +10,10 @@ test:
<<: *default
database: registry_test
demo:
<<: *default
database: registry_demo
whois_test:
<<: *default
database: registry_whois_test

View file

@ -0,0 +1,89 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true
config.public_file_server.enabled = false
# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# 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 = false
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags.
config.log_tags = [:request_id, :subdomain, :remote_ip]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
config.active_job.queue_adapter = :sidekiq
# config.active_job.queue_name_prefix = "domain_name_registry_#{Rails.env}"
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Use a different logger for distributed setups.
require 'syslog/logger'
config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new(ENV['app_name'] || 'registry'))
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end

View file

@ -45,6 +45,9 @@ staging:
app_name: Registry (Staging)
monitor_mode: false
demo:
<<: *default_settings
monitor_mode: false
production:
<<: *default_settings

View file

@ -20,3 +20,6 @@ test:
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
demo:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>