Files
nairobi/config/secrets.yml.example
Javi Martín 5983006657 Use a custom method to detect the current tenant
The subdomain elevator we were using, which is included in apartment,
didn't work on hosts already including a subdomain (like
demo.consul.dev, for instance). In those cases, we would manually add
the subdomain to the list of excluded subdomains. Since these subdomains
will be different for different CONSUL installations, it meant each
installation had to customize the code. Furthermore, existing
installations using subdomains would stop working.

So we're using a custom method to find the current tenant, based on the
host defined in `default_url_options`.

In order to avoid any side-effects on single-tenant applications, we're
adding a new configuration option to enable multitenancy

We're enabling two ways to handle this configuration option:

a) Change the application_custom.rb file, which is under version control
b) Change the secrets.yml file, which is not under version control

This way people prefering to handle configuration options through
version control can do so, while people who prefer handling
configuration options through te secrets.yml file can do so as well.

We're also disabling the super-annoying warnings mentioning there are no
tenants which we got every time we run migrations on single-tenant
applications. These messages will only be enabled when the multitenancy
feature is enabled too. For this reason, we're also disabling the
multitenancy feature in the development environment by default.
2022-11-09 18:19:20 +01:00

123 lines
3.0 KiB
Plaintext

maps: &maps
map_tiles_provider: "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
map_tiles_provider_attribution: "&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors"
apis: &apis
microsoft_api_key: ""
census_api_end_point: ""
census_api_institution_code: ""
census_api_portal_name: ""
census_api_user_code: ""
sms_end_point: ""
sms_username: ""
sms_password: ""
http_basic_auth: &http_basic_auth
http_basic_auth: true
development:
http_basic_username: "dev"
http_basic_password: "pass"
multitenancy: false
secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4
<<: *maps
test:
secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4
<<: *maps
staging:
# secret_key_base: ""
server_name: ""
# mailer_delivery_method: :smtp
# smtp_settings:
# :address: "smtp.example.com"
# :port: 25
# :domain: "your_domain.com"
# :user_name: "<username>"
# :password: "<password>"
# :authentication: "plain"
# :enable_starttls_auto: true
force_ssl: true
delay_jobs: true
email_interceptor_recipients: ""
errbit_host: ""
errbit_project_key: ""
errbit_project_id: 1
errbit_self_hosted_ssl: false
http_basic_username: ""
http_basic_password: ""
managers_url: ""
managers_application_key: ""
multitenancy: false
<<: *maps
<<: *apis
preproduction:
# secret_key_base: ""
server_name: ""
# mailer_delivery_method: :smtp
# smtp_settings:
# :address: "smtp.example.com"
# :port: 25
# :domain: "your_domain.com"
# :user_name: "<username>"
# :password: "<password>"
# :authentication: "plain"
# :enable_starttls_auto: true
force_ssl: true
delay_jobs: true
email_interceptor_recipients: ""
errbit_host: ""
errbit_project_key: ""
errbit_project_id: 1
errbit_self_hosted_ssl: false
http_basic_username: ""
http_basic_password: ""
managers_url: ""
managers_application_key: ""
multitenancy: false
twitter_key: ""
twitter_secret: ""
facebook_key: ""
facebook_secret: ""
google_oauth2_key: ""
google_oauth2_secret: ""
<<: *maps
<<: *apis
production:
# secret_key_base: ""
server_name: ""
# mailer_delivery_method: :smtp
# smtp_settings:
# :address: "smtp.example.com"
# :port: 25
# :domain: "your_domain.com"
# :user_name: "<username>"
# :password: "<password>"
# :authentication: "plain"
# :enable_starttls_auto: true
force_ssl: true
delay_jobs: true
errbit_host: ""
errbit_project_key: ""
errbit_project_id: 1
errbit_self_hosted_ssl: false
http_basic_username: ""
http_basic_password: ""
managers_url: ""
managers_application_key: ""
multitenancy: false
twitter_key: ""
twitter_secret: ""
facebook_key: ""
facebook_secret: ""
google_oauth2_key: ""
google_oauth2_secret: ""
wordpress_oauth2_key: ""
wordpress_oauth2_secret: ""
wordpress_oauth2_site: ""
<<: *maps
<<: *apis