aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-06-06 19:55:55 +0200
committerGravatar Johannes Christ <[email protected]>2021-06-06 19:55:55 +0200
commitfc652a7f4640714800caeb561a7ceb900e48f2a2 (patch)
treeab82e1174c547ff00524a3c06d7d169e628dbcd9 /pydis_site
parentFix `content` app tests not running on macOS (#519) (diff)
Move configuration section to site contributing guide.
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
index ada47931..8c21b5b0 100644
--- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
+++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md
@@ -143,3 +143,35 @@ Unless you are editing the Dockerfile or docker-compose.yml, you shouldn't need
Django provides an interface for administration with which you can view and edit the models among other things.
It can be found at [http://admin.pythondiscord.local:8000](http://admin.pythondiscord.local:8000). The default credentials are `admin` for the username and `admin` for the password.
+
+---
+
+# Configuration in detail
+
+The website is configured through the following environment variables:
+
+## Essential
+- **`DATABASE_URL`**: A string specifying the PostgreSQL database to connect to,
+ in the form `postgresql://user:password@host/database`, such as
+ `postgresql://joethedestroyer:ihavemnesia33@localhost/pysite_dev`
+
+- **`METRICITY_DB_URL`**: A string specifying the PostgreSQL metric database to
+ connect to, in the same form as `$DATABASE_URL`.
+
+- **`DEBUG`**: Controls Django's internal debugging setup. Enable this when
+ you're developing locally. Optional, defaults to `False`.
+
+- **`LOG_LEVEL`**: Any valid Python `logging` module log level - one of `DEBUG`,
+ `INFO`, `WARN`, `ERROR` or `CRITICAL`. When using debug mode, this defaults to
+ `INFO`. When testing, defaults to `ERROR`. Otherwise, defaults to `WARN`.
+
+## Deployment
+- **`ALLOWED_HOSTS`**: A comma-separated lists of alternative hosts to allow to
+ host the website on, when `DEBUG` is not set. Optional, defaults to the
+ `pythondiscord.com` family of domains.
+
+- **`SECRET_KEY`**: The secret key used in various parts of Django. Keep this
+ secret as the name suggests! This is managed for you in debug setups.
+
+- **`STATIC_ROOT`**: The root in which `python manage.py collectstatic` collects
+ static files. Optional, defaults to `/var/www/pythondiscord.com`.