Skip to content

Commit 5b64d1f

Browse files
authored
Merge pull request #523 from python-discord/move-config-docs-to-contributing-guide
Move config docs to contributing guide, kill `docs` directory.
2 parents 3a4a78e + cc59fc7 commit 5b64d1f

File tree

4 files changed

+36
-133
lines changed

4 files changed

+36
-133
lines changed

docs/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/configuration.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/setup.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

pydis_site/apps/content/resources/guides/pydis-guides/contributing/site.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ SECRET_KEY=suitable-for-development-only
7979
STATIC_ROOT=staticfiles
8080
```
8181

82+
The [Configuration in Detail](#configuration-in-detail) section contains
83+
detailed information about these settings.
84+
8285
#### Notes regarding `DATABASE_URL`
8386

8487
- If the database is hosted locally i.e. on the same machine as the webserver, then use `localhost` for the host. Windows and macOS users may need to use the [Docker host IP](../hosts-file/#windows) instead.
@@ -143,3 +146,36 @@ Unless you are editing the Dockerfile or docker-compose.yml, you shouldn't need
143146
Django provides an interface for administration with which you can view and edit the models among other things.
144147

145148
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.
149+
150+
---
151+
152+
# Configuration in detail
153+
154+
The website is configured through the following environment variables:
155+
156+
## Essential
157+
- **`DATABASE_URL`**: A string specifying the PostgreSQL database to connect to,
158+
in the form `postgresql://user:password@host/database`, such as
159+
`postgresql://joethedestroyer:ihavemnesia33@localhost/pysite_dev`
160+
161+
- **`METRICITY_DB_URL`**: A string specifying the PostgreSQL metric database to
162+
connect to, in the same form as `$DATABASE_URL`.
163+
164+
- **`DEBUG`**: Controls Django's internal debugging setup. Enable this when
165+
you're developing locally. Optional, defaults to `False`.
166+
167+
- **`LOG_LEVEL`**: Any valid Python `logging` module log level - one of `DEBUG`,
168+
`INFO`, `WARN`, `ERROR` or `CRITICAL`. When using debug mode, this defaults to
169+
`INFO`. When testing, defaults to `ERROR`. Otherwise, defaults to `WARN`.
170+
171+
## Deployment
172+
- **`ALLOWED_HOSTS`**: A comma-separated lists of alternative hosts to allow to
173+
host the website on, when `DEBUG` is not set. Optional, defaults to the
174+
`pythondiscord.com` family of domains.
175+
176+
- **`SECRET_KEY`**: The secret key used in various parts of Django. Keep this
177+
secret as the name suggests! This is managed for you in debug setups.
178+
179+
- **`STATIC_ROOT`**: The root in which `python manage.py collectstatic`
180+
collects static files. Optional, defaults to `/app/staticfiles` for the
181+
standard Docker deployment.

0 commit comments

Comments
 (0)