aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-03-07 17:46:30 +0100
committerGravatar Leon Sandøy <[email protected]>2018-03-07 17:46:30 +0100
commit51a63f1e4fd0e58a02bd347e5f3a4b81e8ff7112 (patch)
tree60a69f330116bfcbde515f598e2bcef591bc8d5f
parentPython syntax method calls (#24) (diff)
environment variable created, setting API constants dynamic.
-rw-r--r--bot/constants.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 5c0f11fe5..152861367 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -27,11 +27,10 @@ CLICKUP_TEAM = 754996
# URLs
DEPLOY_URL = os.environ.get("DEPLOY_URL")
STATUS_URL = os.environ.get("STATUS_URL")
-# SITE_URL = os.environ.get("SERVER_NAME", "pythondiscord.local:8080") # This needs an environment variable
-SITE_URL = 'pythondiscord.com'
-SITE_PROTOCOL = 'http' if 'local' in SITE_URL else 'https'
-SITE_API_USER_URL = f"{SITE_PROTOCOL}://api.{SITE_URL}/user"
-SITE_API_TAGS_URL = f"{SITE_PROTOCOL}://api.{SITE_URL}/tags"
+API_URL = os.environ.get("API_URL", "pythondiscord.local:8080")
+SITE_PROTOCOL = 'http' if 'local' in API_URL else 'https'
+SITE_API_USER_URL = f"{SITE_PROTOCOL}://{API_URL}/user"
+SITE_API_TAGS_URL = f"{SITE_PROTOCOL}://{API_URL}/tags"
GITHUB_URL_BOT = "https://github.com/discord-python/bot"
BOT_AVATAR_URL = "https://raw.githubusercontent.com/discord-python/branding/master/logos/logo_circle.png"