2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
Server bind
|
|
|
|
-----------
|
|
|
|
Here place the address and port you
|
|
|
|
would like dash to run on.
|
|
|
|
ADDRESS : str
|
|
|
|
Address to bind to.
|
|
|
|
PORT : int
|
|
|
|
Port to listen on.
|
|
|
|
"""
|
|
|
|
ADDRESS = '0.0.0.0'
|
|
|
|
PORT = 3000
|
|
|
|
|
2020-05-17 20:41:57 +00:00
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
PostgreSQL credentials
|
|
|
|
----------------------
|
|
|
|
Here place the PostgreSQL credentials
|
|
|
|
where your Houdini database is located.
|
|
|
|
"""
|
|
|
|
POSTGRES_HOST = 'db'
|
2020-05-07 02:53:59 +00:00
|
|
|
POSTGRES_NAME = '{{ .Env.POSTGRES_USER }}'
|
|
|
|
POSTGRES_USER = '{{ .Env.POSTGRES_USER }}'
|
|
|
|
POSTGRES_PASSWORD = '{{ .Env.POSTGRES_PASSWORD }}'
|
2020-04-26 00:31:21 +00:00
|
|
|
|
|
|
|
|
2020-05-17 20:41:57 +00:00
|
|
|
"""
|
|
|
|
Redis configuration
|
|
|
|
----------------------
|
|
|
|
Here place the Redis configuration.
|
|
|
|
"""
|
|
|
|
|
2020-05-20 01:05:46 +00:00
|
|
|
REDIS_ADDRESS = 'redis'
|
2020-05-17 20:41:57 +00:00
|
|
|
REDIS_PORT = 6379
|
|
|
|
|
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
Google reCAPTCHA
|
|
|
|
----------------
|
|
|
|
GCAPTCHA_URL : str
|
|
|
|
Google captcha verify URL. Normally you do not need to
|
|
|
|
modify this.
|
|
|
|
GSECRET_KEY : str
|
|
|
|
Your reCAPTCHA secret key obtained from Google.
|
|
|
|
|
|
|
|
.. Google reCAPTCHA registration:
|
|
|
|
https://www.google.com/recaptcha/admin/create
|
|
|
|
"""
|
|
|
|
GCAPTCHA_URL = 'https://www.google.com/recaptcha/api/siteverify'
|
2020-05-07 19:25:49 +00:00
|
|
|
GSECRET_KEY = '{{ .Env.WEB_RECAPTCHA_SECRET }}'
|
|
|
|
GSITE_KEY = '{{ .Env.WEB_RECAPTCHA_SITE }}'
|
2020-04-26 00:31:21 +00:00
|
|
|
|
2020-05-17 20:41:57 +00:00
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
Player usernames
|
|
|
|
----------------
|
|
|
|
USERNAME_FORCE_CASE : bool
|
|
|
|
Force capitalized username no matter what user has
|
|
|
|
submitted.
|
|
|
|
|
|
|
|
ex:
|
|
|
|
BASIL -> Basil
|
|
|
|
APPROVE_USERNAME : bool
|
|
|
|
Approves username automatically so they do not have
|
|
|
|
to be approved by an administrator.
|
|
|
|
"""
|
|
|
|
USERNAME_FORCE_CASE = True
|
|
|
|
APPROVE_USERNAME = False
|
|
|
|
|
2020-05-17 20:41:57 +00:00
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
Player activation
|
|
|
|
-----------------
|
|
|
|
ACTIVATE_PLAYER : bool
|
|
|
|
Activate player automatically so no email needs to be sent.
|
|
|
|
Enabling this option requires a SendGrid API key.
|
2020-06-25 14:22:37 +00:00
|
|
|
LEGACY_ACTIVATE_REDIRECT : str
|
2020-05-07 02:53:59 +00:00
|
|
|
URL player is taken to for activation.
|
2020-06-25 14:22:37 +00:00
|
|
|
VANILLA_ACTIVATE_REDIRECT : str
|
2020-04-26 00:31:21 +00:00
|
|
|
URL player is taken to for activation.
|
|
|
|
"""
|
2020-05-07 02:53:59 +00:00
|
|
|
ACTIVATE_PLAYER = {{ if not .Env.WEB_SENDGRID_KEY }}True{{ else }}False{{ end }}
|
2020-06-25 14:22:37 +00:00
|
|
|
LEGACY_ACTIVATE_REDIRECT = '{{ .Env.WEB_LEGACY_PLAY }}'
|
|
|
|
VANILLA_ACTIVATE_REDIRECT = '{{ .Env.WEB_VANILLA_PLAY }}'
|
2020-05-17 20:41:57 +00:00
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
Email
|
|
|
|
-----
|
|
|
|
SITE_NAME : str
|
|
|
|
The name of your site.
|
|
|
|
FROM_EMAIL : str
|
|
|
|
Will appear as the sender for emails sent via the SendGrid
|
|
|
|
API.
|
|
|
|
SENDGRID_API_KEY : str
|
|
|
|
Required for sending emails via the SendGrid API.
|
|
|
|
EMAIL_WHITELIST : list
|
|
|
|
List of email domains to accept. If set to an empty list
|
|
|
|
or `None` then dash will assume all email domains are
|
|
|
|
accepted.
|
|
|
|
MAX_ACCOUNT_EMAIL : int
|
|
|
|
Number of accounts which can be tied to a single email
|
|
|
|
address.
|
|
|
|
.. SendGrid registration:
|
|
|
|
https://signup.sendgrid.com/
|
|
|
|
"""
|
2020-05-07 02:53:59 +00:00
|
|
|
SITE_NAME = '{{ .Env.WEB_HOSTNAME }}'
|
|
|
|
FROM_EMAIL = 'noreply@{{ .Env.WEB_HOSTNAME }}'
|
|
|
|
SENDGRID_API_KEY = '{{ .Env.WEB_SENDGRID_KEY }}'
|
|
|
|
EMAIL_WHITELIST = []
|
2020-04-26 00:31:21 +00:00
|
|
|
MAX_ACCOUNT_EMAIL = 5
|
|
|
|
|
2020-05-17 20:41:57 +00:00
|
|
|
|
2020-04-26 00:31:21 +00:00
|
|
|
"""
|
|
|
|
Cryptography
|
|
|
|
------------
|
|
|
|
STATIC_KEY : str
|
|
|
|
Static key used to hash passwords. Should not be
|
|
|
|
changed unless required by login server auth.
|
|
|
|
"""
|
|
|
|
STATIC_KEY = 'houdini'
|
2020-05-07 02:53:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
Sub-domains
|
|
|
|
------------
|
2020-05-17 20:41:57 +00:00
|
|
|
LEGACY_PLAY_LINK : str
|
|
|
|
Play page sub-domain used to handle links for the AS2 registration page.
|
|
|
|
VANILLA_PLAY_LINK : str
|
|
|
|
Play page sub-domain used to handle links & load content for the AS3 registration page.
|
|
|
|
"""
|
|
|
|
LEGACY_PLAY_LINK = '{{ .Env.WEB_LEGACY_PLAY }}'
|
|
|
|
VANILLA_PLAY_LINK = '{{ .Env.WEB_VANILLA_PLAY }}'
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
Password reset
|
|
|
|
-----------------
|
|
|
|
AUTH_TTL : int
|
|
|
|
Time in seconds till a players password reset token expires.
|
|
|
|
PASSWORD_REDIRECT : str
|
|
|
|
URL to redirect to when player has reset their password.
|
2020-05-07 02:53:59 +00:00
|
|
|
"""
|
2020-05-17 20:41:57 +00:00
|
|
|
AUTH_TTL = 3600
|
|
|
|
PASSWORD_REDIRECT = ''
|
2020-05-07 02:53:59 +00:00
|
|
|
|
2020-06-20 01:51:53 +00:00
|
|
|
"""
|
|
|
|
Manager
|
|
|
|
-----------------
|
|
|
|
LOGIN_FAILURE_TIMER : int
|
|
|
|
Time in seconds till the temporary login ban expires.
|
|
|
|
LOGIN_FAILURE_LIMIT : int
|
|
|
|
Amount of times a player can attempt to login
|
|
|
|
before being locked out.
|
|
|
|
"""
|
|
|
|
LOGIN_FAILURE_TIMER = 3600
|
|
|
|
LOGIN_FAILURE_LIMIT = 5
|
|
|
|
|
2020-05-07 02:53:59 +00:00
|
|
|
|
2024-06-19 03:30:54 +00:00
|
|
|
"""
|
|
|
|
Card-Jitsu Snow
|
|
|
|
---------------
|
|
|
|
CJS_HOST : str
|
|
|
|
External ip or domain of the Card-Jitsu Snow game server.
|
|
|
|
CJS_PORT : int
|
|
|
|
Port of the Card-Jitsu Snow game server.
|
|
|
|
"""
|
|
|
|
CJS_HOST = '{{ .Env.SNOWFLAKE_HOST }}'
|
|
|
|
CJS_PORT = {{ .Env.SNOWFLAKE_PORT }}
|
|
|
|
|
|
|
|
|
2020-05-07 02:53:59 +00:00
|
|
|
# For more configuration settings see
|
2020-05-17 20:41:57 +00:00
|
|
|
# https://sanic.readthedocs.io/en/latest/sanic/config.html#builtin-configuration-values
|