======== Settings ======== sewifurs.org reads its configuration from two locations: - the file `instance/config.py`, if it exists - environment variables, prefixed with `SEWIFURS_` Use SCREAMING_SNAKE_CASE when providing values. Deployment settings =================== sewifurs.org uses Docker Compose for development and deployment. The Compose configuration is split into `compose.yaml`, which defines all the 'core' infrastructure for sewifurs.org, and `compose.deploy.yaml`, which contains specifics for how it is deployed to the self-hosted server that powers https://sewifurs.org/ and other related websites. The former is recommended for everyone to use, while the latter is recommended to modify (or ignore) to fit your deployment environment. If you are using the base `compose.yaml`, set the environment variable `SEWIFURS_PORT` to a port available on the host machine for nginx to be exposed on. The default is `5000`. If you go a step further and use `compose.deploy.yaml` as well, `SEWIFURS_TIER` should be `staging`, `production`, or any other environment name that can be stuffed into a directory name. .. note:: When using ``compose.deploy.yaml``, by default, all sewifurs.org services will be configured to run on startup. Dependencies' settings ====================== Some of sewifurs.org's dependencies also read values from `instance/config.py`. These are: - `Flask `_ - You must set `SECRET_KEY`, or some website functions will not work. Application settings ==================== These settings are specific to sewifurs.org itself. While they can be read using Flask's standard configuration system, it is recommended to instead access them through :class:`sewifurs.settings.Settings` for inline documentation, type information, and default values. Use the lowercase version of each key when reading settings from this object. Database -------- .. autoproperty:: sewifurs.settings::Settings.database_url Telegram bot ------------ .. autoproperty:: sewifurs.settings::Settings.admin_chat_id .. autoproperty:: sewifurs.settings::Settings.bot_token News messages ------------- Make sure `BOT_TOKEN` is also set in order to read and record news messages. .. autoproperty:: sewifurs.settings::Settings.allowed_channels .. autoproperty:: sewifurs.settings::Settings.show_news Permissions ----------- To set people's permissions with `/set_permission` or through the Tools section of the website, set a superuser first. .. autoproperty:: sewifurs.settings::Settings.superuser_id External services ----------------- .. autoproperty:: sewifurs.settings::Settings.bluesky_domains .. autoproperty:: sewifurs.settings::Settings.calendar_url .. autoproperty:: sewifurs.settings::Settings.mappoll_base .. autoproperty:: sewifurs.settings::Settings.scam_tracking_url .. autoproperty:: sewifurs.settings::Settings.scam_tracking_info_url .. autoproperty:: sewifurs.settings::Settings.scam_tracking_cache_timeout Website ------- .. autoproperty:: sewifurs.settings::Settings.base .. autoproperty:: sewifurs.settings::Settings.development .. autoproperty:: sewifurs.settings::Settings.webring_url