You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
5.7 KiB

  1. # Environment variables
  2. You can configure some of BirdsiteLIVE's settings via environment variables (those are optionnals):
  3. ## Blacklisting & Whitelisting
  4. ### Fediverse users and instances
  5. Here are the supported patterns to describe Fediverse users and/or instances:
  6. * `@user@instance.ext` to describe a Fediverse user
  7. * `instance.ext` to describe an instance under a domain name
  8. * `*.instance.ext` to describe instances from all subdomains of a domain name (this doesn't include the instance.ext, if you want both you need to add both)
  9. You can whitelist or blacklist fediverses users by settings the followings variables with the above patterns separated by `;`:
  10. * `Moderation:FollowersWhiteListing` Fediverse Whitelisting
  11. * `Moderation:FollowersBlackListing` Fediverse Blacklisting
  12. If the whitelisting is set, only given patterns can follow twitter accounts on the instance.
  13. If blacklisted, the given patterns can't follow twitter accounts on the instance.
  14. If both whitelisting and blacklisting are set, only the whitelisting will be active.
  15. ### Twitter users
  16. Here is the supported pattern to describe Twitter users:
  17. * `twitter_handle` to describe a Twitter user
  18. You can whitelist or blacklist twitter users by settings the followings variables with the above pattern separated by `;`:
  19. * `Moderation:TwitterAccountsWhiteListing` Twitter Whitelisting
  20. * `Moderation:TwitterAccountsBlackListing` Twitter Blacklisting
  21. If the whitelisting is set, only given patterns can be followed on the instance.
  22. If blacklisted, the given patterns can't be followed on the instance.
  23. If both whitelisting and blacklisting are set, only the whitelisting will be active.
  24. ## Logging
  25. * `Logging:Type` (default: none) set the type of the logging and monitoring system, currently the only type supported is `insights` for *Azure Application Insights* (PR welcome to support other types)
  26. * `Logging:InstrumentationKey` the instrumentation key for Azure Application Insights
  27. ## Instance customization
  28. * `Instance:Name` (default: BirdsiteLIVE) the name of the instance
  29. * `Instance:ResolveMentionsInProfiles` (default: true) to enable or disable mentions parsing in profile's description. Resolving it will consume more User's API calls since newly discovered account can also contain references to others accounts as well. On a big instance it is recommended to disable it.
  30. * `Instance:PublishReplies` (default: false) to enable or disable replies publishing.
  31. * `Instance:UnlistedTwitterAccounts` (default: null) to enable unlisted publication for selected twitter accounts, separated by `;` (please limit this to brands and other public profiles).
  32. * `Instance:TwitterDomain` (default: twitter.com) redirect to a different domain (i.e. a Nitter instance) instead of Twitter in most areas
  33. * `Instance:TwitterDomainLabel` (default: "") if TwitterDomain is set, use this label on profile pages instead of the domain itself (i.e. you can set this to "Nitter" to show that on profiles instead of "twiiit.com")
  34. * `Instance:InfoBanner` (default: "") text to show in a banner on the front page
  35. * `Instance:ShowAboutInstanceOnProfiles` (default: true) show "About [instance name]" on profiles with a link to /About
  36. * `Instance:MaxFollowsPerUser` (default: 0 - no limit) limit the number of follows per user - any follow count above this number will be Rejected
  37. * `Instance:DiscloseInstanceRestrictions` (default: false) disclose your instance's restrictions on its About page
  38. * `Instance:UnlistedTwitterAccounts` (default: null) to enable unlisted publication for selected twitter accounts, separated by `;` (please limit this to brands and other public profiles).
  39. * `Instance:SensitiveTwitterAccounts` (default: null) mark all media from given accounts as sensitive by default, separated by `;`.
  40. * `Instance:FailingTwitterUserCleanUpThreshold` (default: 700) set the max allowed errors (due to a banned/deleted/private account) from a Twitter Account retrieval before auto-removal. (by default an account is called every 15 mins)
  41. * `Instance:MaxStatusFetchAge` (default: 0 - no limit) statuses with a Snowflake older than this age in days will not be fetched by the service and will instead return 410 Gone
  42. * `Instance:EnableQuoteRT` (default: false) enable Soapbox-style quote-RTs
  43. # Docker Compose full example
  44. In order to illustrate above variables, here is an example of an updated `docker-compose.yml` file:
  45. ```diff
  46. version: "3"
  47. networks:
  48. [...]
  49. services:
  50. server:
  51. image: pasture/birdsitelive:latest
  52. [...]
  53. environment:
  54. - Instance:Domain=domain.name
  55. - Instance:AdminEmail=name@domain.ext
  56. - Db:Type=postgres
  57. - Db:Host=db
  58. - Db:Name=birdsitelive
  59. - Db:User=birdsitelive
  60. - Db:Password=birdsitelive
  61. - Twitter:ConsumerKey=twitter.api.key
  62. - Twitter:ConsumerSecret=twitter.api.key
  63. + - Moderation:FollowersWhiteListing=@me@my-instance.ca;friend-instance.com;*.friend-instance.com
  64. + - Moderation:TwitterAccountsBlackListing=douchebag;jerk_88;theRealIdiot
  65. + - Instance:Name=MyTwitterRelay
  66. + - Instance:ResolveMentionsInProfiles=false
  67. + - Instance:PublishReplies=true
  68. + - Instance:UnlistedTwitterAccounts=cocacola;twitter
  69. + - Instance:TwitterDomain=twiiit.com
  70. + - Instance:TwitterDomainLabel=Nitter
  71. + - Instance:InfoBanner=This is my BirdsiteLIVE instance. There are many like it, but this one is mine.
  72. + - Instance:ShowAboutInstanceOnProfiles=true
  73. + - Instance:SensitiveTwitterAccounts=archillect
  74. networks:
  75. [...]
  76. db:
  77. image: postgres:13
  78. [...]
  79. ```
  80. ## Apply the modifications
  81. After the modification of the `docker-compose.yml` file, you will need to run `docker-compose up -d` to apply the changes.