Settings#
The site is configured with environment variables, such as in .env next to
docker-compose.yml. .env.example lists every one of them with its
default. A wrong setting stops the site with an error of Errors.
The address#
SITE_URLThe address of the site, without
/at the end. The GitHub App, its webhook and the sign in use it. Default:https://dashboard.pycal.org.SITE_NAMEThe name in the title bar. Default:
dashboard.pycal.org.ALLOWED_HOSTSThe host names of the site, comma separated. The health check sends the first one.
CSRF_TRUSTED_ORIGINSThe addresses whose forms the site accepts, comma separated; forms of other origins are refused. Default:
SITE_URL.
The GitHub App#
Leave these empty and register the app on the site, see
Register the GitHub App and the OAuth app; the registration writes them into
DATA_DIR/.env. Values of the environment take precedence.
GITHUB_APP_IDThe numeric id of the app.
GITHUB_APP_SLUGThe name of the app in
https://github.com/apps/<slug>.GITHUB_CLIENT_ID,GITHUB_SECRETThe client of the app. The registration stores it; the site does not sign people in with it.
GITHUB_WEBHOOK_SECRETThe secret of the webhooks; without it all webhooks are refused.
GITHUB_APP_PRIVATE_KEY_FILEThe file of the private key, such as
/app/data/github-app.pem.GITHUB_APP_PRIVATE_KEYOr the key itself, with
\nfor the line breaks.GITHUB_APIOnly for GitHub Enterprise Server. Default:
https://api.github.com.GITHUB_ORGANIZATIONSThe organizations of the community of the site, comma separated: the start page links them, and the form of the registration proposes the first one as the owner of the GitHub App. Every account may install the app. Default:
PyCalendar.
The OAuth app#
GITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_SECRETThe OAuth app that signs people in; without it nobody can sign in. Enter it on
/setup/oauth-app/, which writes it intoDATA_DIR/.env, or set it here, see Sign people in with the OAuth app.
People#
SITE_ADMINSGitHub handles, comma separated, that administer the site: the Django admin and the webhook deliveries. The rights follow the setting at every request, also for people who signed in before it changed.
SIGN_OUT_MINUTESMinutes after signing in when people are signed out again, also while they use the site. Default:
60.
Data and secrets#
DATA_DIRThe directory of the SQLite database, the secret key and the GitHub App. Default:
/app/datain the container.SECRET_KEYGenerated once into
DATA_DIRif empty.DATABASE_URLAnother database, such as
postgres://...; SQLite by default.DEBUGtrueonly for development: details of errors and no setup code.LOG_LEVELINFOby default.
The container#
PORTThe port of nginx in the container. Default:
5000.WORKERS,THREADSThe processes and threads of gunicorn. Default:
2and4.
Email#
EMAIL_HOST,EMAIL_PORT,EMAIL_HOST_USER,EMAIL_HOST_PASSWORD,EMAIL_USE_TLS,EMAIL_USE_SSL,DEFAULT_FROM_EMAILThe mail server. Without
EMAIL_HOSTemails are written into the log.
Look and links#
COLOR_<NAME>,COLOR_DARK_<NAME>The colors of the light and the dark pages, such as
COLOR_PRIMARY=#2b5b84. The defaults are the colors of sign.pycal.org: the blue#3b79aaand the yellow#ffd43bof the pycal logo. The names are those ofpycal_dashboard/theme.py, such asPRIMARY,ACCENTorNAV.FAVICONThe icon of the site: an address, such as
https://pycal.org/favicon.png, or the path of a PNG, ICO or SVG file in the container, such as/app/data/favicon.png. Empty: the icon of pycal. A wrong file stops the site withFaviconNotFoundorUnsupportedFavicon.FOOTER_LINKSThe extra links of the footer, comma separated, each
Title=URL, such aspycal.org=https://pycal.org,Blog=https://example.org/blog/. Empty: no extra links. Default:pycal.org=https://pycal.org.SOURCE_URLThe repository of the code.
DOCS_URLThis documentation; the error pages link to it. Default:
https://docs.dashboard.pycal.org/.