Repository for the Dreadrise website used in the Penny Dreadful community and the MSE Modern community.
- Install python 3.10+
- Run
pip install -r requirements.txt -r requirements-dev.txt
- Create a MongoDB database for each distribution you're planning to use. They can be on the same or different clusters.
- Put the connection string into the
config/dist/<dname>/secrets.yml
file like this:MONGODB_URL: mongodb+srv://user:password@mongo_url/db_name
- Run
pipenv run python run.py website --debug
to run the website.- By default, runs on
localhost:3002
--debug
enables automatic reload of the Python code and of templates.
- By default, runs on
- After you're finished development, run
pipenv run python dev.py complete
to sort imports and lint the code.
- Each directory (
config
as well asconfig/dist/<dname>
) can have up to two files:core.yml
andsecrets.yml
. - Secrets are ignored from version control.
- In the same directory, the secrets override the core settings.
- Between directories, the distribution directory overrides the main directory.
- Some configuration variables cannot be overridden by distributions.
- In addition, environmental variables override the secrets.
- Envs with the name
default__VAR
override the default ones. (Note the double underscore) - Envs with the name
dname__VAR
override the ones for a given distribution.
- Envs with the name
- The configuration options:
- Can be overridden by distributions
BRAND
- has the title which is shown on the websiteMONGODB_URL
- the database connection string (see above)gateway_key
- used for external POST requests to/api/gateway
allow_disk_use
- set this to any non-empty string to allow disk usage when using search. Can accelerate some searches, but does not work on free Atlas clusters.- Currently, does not do anything (after the search optimizations).
- Cannot be overridden
DISCORD_CLIENT_ID
- used for loginsDISCORD_CLIENT_SECRET
- used for loginssession_backend
- can be eitherflask
orfirestore
.firestore
enables the session to be stored in the Google Firestore database. Requires the installation of Google python package.- Good luck figuring where it takes the secrets from because idr lol
secret_key
- the cookie key, used for cookie validationPORT
- the port the application is run on when usingrun.py website
repo_location
- the repository location, used for the update gateway
- Can be overridden by distributions