From 662e1e30ae11788d686827496fbe18debf223e0e Mon Sep 17 00:00:00 2001 From: brassy endomorph Date: Thu, 17 Oct 2024 06:25:31 +0000 Subject: [PATCH] split config docs into app & worker sections --- docs/config.md | 158 +++++++++++++++-------- hushline/templates/settings/aliases.html | 2 +- 2 files changed, 104 insertions(+), 56 deletions(-) diff --git a/docs/config.md b/docs/config.md index cf5aa926..01c80d49 100644 --- a/docs/config.md +++ b/docs/config.md @@ -5,52 +5,56 @@ The following env vars are available to configure the app. Note: There may be additional env vars the code uses, but if they are undocumented, their use is unsupported. +To support customization of the app, there are two methods of setting arbitrary config values. + +- All values of the form `HL_CFG_*` will have the prefix `HL_CFG_` stripped and will be set as strings in the config. (e.g., `HL_CFG_FOO='bar'` will set the config `FOO` to the string `bar`) +- All values of the form `HL_CFG_JSON_*` will have the prefix `HL_CFG_JSON_` stripped and will be parsed as JSON then set in the config. (e.g., `HL_CFG_FOO='123'` will set the config `FOO` to the int `123` and `HL_CFG_BAZ='"true"'` [note the quotes] will the config `BAZ` to the string `true`) + +## Web App + +These configs are needed for the web app. + - - + + - - - + - - - + + + - + - + - - - - + + + - - - + - + - - - + + + @@ -60,39 +64,46 @@ Note: There may be additional env vars the code uses, but if they are undocument - + - - - + + + - - - + + + - + - + - + - + + + + + + + + - + - + - + @@ -102,18 +113,25 @@ Note: There may be additional env vars the code uses, but if they are undocument - + - - + + - + - - - + + + + + + + + + + @@ -136,19 +154,49 @@ Note: There may be additional env vars the code uses, but if they are undocument + +
Env Var RequiredType/FormatDefaultType/FormatDefault Purpose
SERVER_NAMEDIRECTORY_VERIFIED_TAB_ENABLED falsestringSet the server/host name in Flaskbooleantrue + Enable the "Verified" tab on the Hush Line directory. + When set to true, the directory shows only verified users with a second tab for all users. + When set to false, a single tab with all users is displayed. +
SECRET_KEYENCRYPTION_KEY true string The Flask secret key used for signing cookies.The key used for handling crypto operations on DB fields.
SQLALCHEMY_DATABASE_URItrueURLONION_HOSTNAMEfalsestring SqlAlchemy database connection string
Tor Onion Service host name that the Hush Line app is additionally available as.
DIRECTORY_VERIFIED_TAB_ENABLEDNOTIFICATIONS_ADDRESS falsebooleantrue - Enable the "Verified" tab on the Hush Line directory. - When set to true, the directory shows only verified users with a second tab for all users. - When set to false, a single tab with all users is displayed. - email addressEmail address to use for sending message notifications
REGISTRATION_CODES_REQUIREDWhether or not new user registrations require invite codes.
NOTIFICATIONS_ADDRESSREQUIRE_PGP falseemail addressEmail address to use for sending message notificationsbooleanfalseWhether users are required to use PGP to receive messages.
SMTP_FORWARDING_MESSAGE_HTMLfalseHTMLSECRET_KEYtruestring Message to display on the Email settings page below the SMTP forwarding config.The Flask secret key used for signing cookies.
SMTP_USERNAMESERVER_NAME false string SMTP username for sending notificationsSet the server/host name in Flask
SMTP_PASSWORDSMTP_ENCRYPTION false stringStartTLSSMTP encryption method for sending notifications
SMTP_FORWARDING_MESSAGE_HTMLfalseHTML SMTP password for sending notificationsMessage to display on the Email settings page below the SMTP forwarding config.
SMTP_SERVERSMTP_PASSWORD false string SMTP server for sending notificationsSMTP password for sending notifications
SMTP_PORTSMTP port for sending notifications
SMTP_ENCRYPTIONSMTP_SERVER false stringStartTLSSMTP encryption method for sending notificationsSMTP server for sending notifications
REQUIRE_PGPSMTP_USERNAME falsebooleanfalseWhether users are required to use PGP to receive messages.stringSMTP username for sending notifications
SQLALCHEMY_DATABASE_URItrueURLSqlAlchemy database connection string
STRIPE_PUBLISHABLE_KEY Stripe webhook key for enabling payments
+ +## Stripe Worker + + + - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + +
ONION_HOSTNAMEEnv VarRequiredType/FormatDefaultPurpose
SQLALCHEMY_DATABASE_URItrueURLSqlAlchemy database connection string
STRIPE_PUBLISHABLE_KEY false string Tor Onion Service host name that the Hush Line app is additionally available as.Stripe publishable key for enabling payments
STRIPE_SECRET_KEYfalsestringStripe secret key for enabling payments
STRIPE_WEBHOOK_SECRETfalsestringStripe webhook key for enabling payments
- -## Customization - -To support customization of the app, there are two methods of setting arbitrary config values. - -- All values of the form `HL_CFG_*` will have the prefix `HL_CFG_` stripped and will be set as strings in the config. (e.g., `HL_CFG_FOO='bar'` will set the config `FOO` to the string `bar`) -- All values of the form `HL_CFG_JSON_*` will have the prefix `HL_CFG_JSON_` stripped and will be parsed as JSON then set in the config. (e.g., `HL_CFG_FOO='123'` will set the config `FOO` to the int `123` and `HL_CFG_BAZ='"true"'` [note the quotes] will the config `BAZ` to the string `true`) diff --git a/hushline/templates/settings/aliases.html b/hushline/templates/settings/aliases.html index 874afa54..05c6ad6e 100644 --- a/hushline/templates/settings/aliases.html +++ b/hushline/templates/settings/aliases.html @@ -26,7 +26,7 @@

Current Aliases

{{ username.display_name or username.username }} - +
{% endfor %}