config.ini.template 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. [sr.ht]
  2. #
  3. # The name of your network of sr.ht-based sites
  4. site-name=sourcehut
  5. #
  6. # The top-level info page for your site
  7. site-info=https://sourcehut.org
  8. #
  9. # {{ site-name }}, {{ site-blurb }}
  10. site-blurb=the hacker's forge
  11. #
  12. # If this != production, we add a banner to each page
  13. environment=production
  14. #
  15. # Contact information for the site owners
  16. owner-name=Drew DeVault
  17. owner-email=sir@cmpwn.com
  18. #
  19. # The source code for your fork of sr.ht
  20. source-url=https://git.sr.ht/~sircmpwn/srht
  21. #
  22. # A key used for encrypting session cookies. Use `srht-keygen service` to
  23. # generate the service key. This must be shared between each node of the same
  24. # service (e.g. git1.sr.ht and git2.sr.ht), but different services may use
  25. # different keys. If you configure all of your services with the same
  26. # config.ini, you may use the same service-key for all of them.
  27. service-key={{SERVICE_KEY}}
  28. #
  29. # A secret key to encrypt internal messages with. Use `srht-keygen network` to
  30. # generate this key. It must be consistent between all services and nodes.
  31. network-key={{NETWORK_KEY}}
  32. #
  33. # The redis host URL. This is used for caching and temporary storage, and must
  34. # be shared between nodes (e.g. git1.sr.ht and git2.sr.ht), but need not be
  35. # shared between services. It may be shared between services, however, with no
  36. # ill effect, if this better suits your infrastructure.
  37. redis-host=redis://127.0.0.1:6379
  38. #
  39. # The Prometheus Pushgateway instance to deliver gitsrht-periodic metrics to (http[s]://host:port)
  40. pushgateway=
  41. [objects]
  42. # Configure the S3-compatible object storage service. Leave empty to disable
  43. # object storage.
  44. #
  45. # Minio is recommended as a FOSS solution over AWS: https://min.io
  46. s3-upstream=
  47. s3-access-key=
  48. s3-secret-key=
  49. [mail]
  50. #
  51. # Outgoing SMTP settings
  52. smtp-host=
  53. smtp-port=
  54. smtp-from=
  55. #
  56. # Default: starttls
  57. # Options: starttls, tls, insecure
  58. smtp-encryption=starttls
  59. #
  60. # Default: plain
  61. # Options: plain, none
  62. smtp-auth=plain
  63. # user / password are required if smtp-auth is plain
  64. smtp-user=
  65. smtp-password=
  66. #
  67. # Application exceptions are emailed to this address
  68. error-to=
  69. error-from=
  70. #
  71. # You should generate a PGP key to allow users to authenticate emails received
  72. # from your services. Use `gpg --edit-key [key id]` to remove the password from
  73. # your private key, then export it to a file and set pgp-privkey to the path to
  74. # that file. pgp-pubkey should be set to the path to your public key, and
  75. # pgp-key-id should be set to the key ID string. Outgoing emails are signed with
  76. # this PGP key.
  77. pgp-privkey=
  78. pgp-pubkey=
  79. pgp-key-id=
  80. [webhooks]
  81. #
  82. # base64-encoded Ed25519 key for signing webhook payloads. This should be
  83. # consistent between all services.
  84. #
  85. # Use the `srht-keygen webhook` command to generate this key. Put the private
  86. # key here and distribute the public key to anyone who would want to verify
  87. # webhook payloads from your service.
  88. private-key={{WEBHOOK_KEY}}
  89. [git.sr.ht]
  90. #
  91. # URL git.sr.ht is being served at (protocol://domain)
  92. origin={{gitsrht_domain}}
  93. #
  94. # Address and port to bind the debug server to
  95. debug-host=0.0.0.0
  96. debug-port=5001
  97. #
  98. # Configures the SQLAlchemy connection string for the database.
  99. connection-string=postgresql://postgres@localhost/git.sr.ht
  100. #
  101. # Set to "yes" to automatically run migrations on package upgrade.
  102. migrate-on-upgrade=yes
  103. #
  104. # The redis connection used for the webhooks worker
  105. webhooks=redis://localhost:6379/1
  106. #
  107. # A post-update script which is installed in every git repo.
  108. post-update-script=/usr/bin/gitsrht-update-hook
  109. #
  110. # git.sr.ht's OAuth client ID and secret for meta.sr.ht
  111. # Register your client at meta.example.org/oauth
  112. oauth-client-id=CHANGEME
  113. oauth-client-secret=CHANGEME
  114. #
  115. # Path to git repositories on disk
  116. repos=/var/lib/git/
  117. #
  118. # Configure the S3 bucket and prefix for object storage. Leave empty to disable
  119. # object storage. Bucket is required to enable object storage; prefix is
  120. # optional.
  121. s3-bucket=
  122. s3-prefix=
  123. #
  124. # Required for preparing and sending patchsets from git.sr.ht
  125. outgoing-domain=
  126. #
  127. # Origin URL for the API
  128. # Only needed if not run behind a reverse proxy, e.g. for local development.
  129. # By default, the API port is 100 more than the web port
  130. #api-origin=http://localhost:5101
  131. [git.sr.ht::api]
  132. #
  133. # Maximum complexity of GraphQL queries. The higher this number, the more work
  134. # that API clients can burden the API backend with. Complexity is equal to the
  135. # number of discrete fields which would be returned to the user. 200 is a good
  136. # default.
  137. max-complexity=200
  138. #
  139. # The maximum time the API backend will spend processing a single API request.
  140. #
  141. # See https://golang.org/pkg/time/#ParseDuration
  142. max-duration=3s
  143. #
  144. # Set of IP subnets which are permitted to utilize internal API
  145. # authentication. This should be limited to the subnets from which your
  146. # *.sr.ht services are running.
  147. #
  148. # Comma-separated, CIDR notation.
  149. internal-ipnet=127.0.0.0/8,::1/128,192.168.0.0/16,10.0.0.0/8
  150. [git.sr.ht::dispatch]
  151. #
  152. # The authorized keys hook uses this to dispatch to various handlers
  153. # The format is a program to exec into as the key, and the user to match as the
  154. # value. When someone tries to log in as this user, this program is executed
  155. # and is expected to omit an AuthorizedKeys file.
  156. #
  157. # Uncomment the relevant lines to enable the various sr.ht dispatchers.
  158. /usr/bin/gitsrht-keys=git:git
  159. #/usr/bin/buildsrht-keys=builds:builds
  160. [meta.sr.ht]
  161. origin={{metasrht_domain}}
  162. #
  163. # Address and port to bind the debug server to
  164. debug-host=0.0.0.0
  165. debug-port=5000
  166. #
  167. # Configures the SQLAlchemy connection string for the database.
  168. connection-string=postgresql://postgres@localhost/meta.sr.ht
  169. #
  170. # Set to "yes" to automatically run migrations on package upgrade.
  171. migrate-on-upgrade=yes
  172. [meta.sr.ht::settings]
  173. #
  174. # If "no", public registration will not be permitted.
  175. registration=yes
  176. #
  177. # Where to redirect new users upon registration
  178. onboarding-redirect={{DOMAIN}}:5000
  179. #
  180. # How many invites each user is issued upon registration (only applicable if
  181. # open registration is disabled)
  182. user-invites=5
  183. [meta.sr.ht::aliases]
  184. #
  185. # You can add aliases for the client IDs of commonly used OAuth clients here.
  186. #
  187. # Example:
  188. # git.sr.ht=12345
  189. # Uncomment this to provide optional builds.sr.ht integration
  190. #[builds.sr.ht]
  191. #origin=http://builds.sr.ht.local
  192. #oauth-client-id=CHANGEME
  193. [meta.sr.ht::billing]
  194. #
  195. # "yes" to enable the billing system
  196. enabled=no
  197. #
  198. # Get your keys at https://dashboard.stripe.com/account/apikeys
  199. stripe-public-key=
  200. stripe-secret-key=
  201. [paste.sr.ht]
  202. #
  203. # URL paste.sr.ht is being served at (protocol://domain)
  204. origin=http://paste.sr.ht.local
  205. #
  206. # Address and port to bind the debug server to
  207. debug-host=0.0.0.0
  208. debug-port=5011
  209. #
  210. # Configures the SQLAlchemy connection string for the database.
  211. connection-string=postgresql://postgres@localhost/paste.sr.ht
  212. #
  213. # Set to "yes" to automatically run migrations on package upgrade.
  214. migrate-on-upgrade=yes
  215. #
  216. # paste.sr.ht's OAuth client ID and secret for meta.sr.ht
  217. # Register your client at meta.example.org/oauth
  218. oauth-client-id=
  219. oauth-client-secret=
  220. #
  221. # Origin URL for the API
  222. # Only needed if not run behind a reverse proxy, e.g. for local development.
  223. # By default, the API port is 100 more than the web port
  224. #api-origin=http://localhost:5111