Add primary domain setting

This commit is contained in:
Râu Cao 2023-03-18 13:34:35 +07:00
parent 2cced696f5
commit c48538a1c6
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,4 @@
PRIMARY_DOMAIN=kosmos.org
AKKOUNTS_DOMAIN=accounts.example.com
SMTP_SERVER=smtp.example.com
@ -9,13 +10,13 @@ SMTP_DOMAIN=example.com
SMTP_AUTH_METHOD=plain
SMTP_ENABLE_STARTTLS=auto
REDIS_URL='redis://localhost:6379/1'
LDAP_HOST=localhost
LDAP_PORT=389
LDAP_ADMIN_PASSWORD=passthebutter
LDAP_SUFFIX='dc=kosmos,dc=org'
REDIS_URL='redis://localhost:6379/1'
WEBHOOKS_ALLOWED_IPS='10.1.1.163'
DISCOURSE_PUBLIC_URL='https://community.kosmos.org'

View File

@ -1,3 +1,5 @@
PRIMARY_DOMAIN=kosmos.org
DISCOURSE_PUBLIC_URL='http://discourse.example.com'
DISCOURSE_CONNECT_SECRET='discourse_connect_ftw'

View File

@ -2,6 +2,9 @@
class Setting < RailsSettings::Base
cache_prefix { "v1" }
field :primary_domain, type: :string,
default: ENV["PRIMARY_DOMAIN"].presence
field :accounts_domain, type: :string,
default: ENV["AKKOUNTS_DOMAIN"].presence