pagure.cfg.sample 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. import os
  2. from datetime import timedelta
  3. ### Set the time after which the admin session expires
  4. # There are two sessions on pagure, login that holds for 31 days and
  5. # the session defined here after which an user has to re-login.
  6. # This session is used when accessing all administrative parts of pagure
  7. # (ie: changing a project's or a user's settings)
  8. ADMIN_SESSION_LIFETIME = timedelta(minutes=20)
  9. # Enable tickets and docs for all repos
  10. ENABLE_TICKETS = True
  11. ENABLE_DOCS = True
  12. # Enables / Disables private projects
  13. PRIVATE_PROJECTS = True
  14. ### Secret key for the Flask application
  15. SECRET_KEY='<The web application secret key>'
  16. ### url to the database server:
  17. #DB_URL = 'mysql://user:pass@host/db_name'
  18. #DB_URL = 'postgres://user:pass@host/db_name'
  19. DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
  20. ### Send FedMsg notifications of events in pagure
  21. FEDMSG_NOTIFICATIONS = False
  22. ### The FAS group in which the admin of pagure are
  23. ADMIN_GROUP = ['sysadmin-main']
  24. ### Hard-coded list of global admins
  25. PAGURE_ADMIN_USERS = []
  26. ### Enables sending email using SMTP credentials.
  27. EMAIL_SEND = False
  28. ### The email address to which the flask.log will send the errors (tracebacks)
  29. EMAIL_ERROR = 'root@localhost'
  30. ### SMTP settings
  31. SMTP_SERVER = 'localhost'
  32. SMTP_PORT = 25
  33. SMTP_SSL = False
  34. #Specify both for enabling SMTP with auth
  35. SMTP_USERNAME = None
  36. SMTP_PASSWORD = None
  37. ### Information used to sent notifications
  38. FROM_EMAIL = 'pagure@localhost.localdomain'
  39. DOMAIN_EMAIL_NOTIFICATIONS = 'localhost.localdomain'
  40. SALT_EMAIL = '<secret key to be changed>'
  41. ### Restrict outgoing emails to these domains:
  42. ## If set, adding emailaccounts that don't end with these domainnames
  43. ## will not be permitted. Mails to already existing emailaccounts
  44. ## that are not covered by this list will not get sent.
  45. # ALLOWED_EMAIL_DOMAINS = [ 'localhost.localdomain', 'example.com' ]
  46. ### Disallow remote pull requests
  47. ## If set, remote pull requests will be disabled and not available
  48. ## anymore as a selection in the PR dropdown menus
  49. DISABLE_REMOTE_PR = False
  50. ### The URL at which the project is available.
  51. APP_URL = 'http://localhost.localdomain/'
  52. ### The URL at which the documentation of projects will be available
  53. ## This should be in a different domain to avoid XSS issues since we want
  54. ## to allow raw html to be displayed (different domain, ie not a sub-domain).
  55. DOC_APP_URL = 'http://docs.localhost.localdomain'
  56. ### The URL to use to clone git repositories.
  57. GIT_URL_SSH = 'ssh://git@localhost.localdomain/'
  58. GIT_URL_GIT = 'git://localhost.localdomain/'
  59. ### Folder containing to the git repos
  60. GIT_FOLDER = os.path.join(
  61. os.path.abspath(os.path.dirname(__file__)),
  62. '..',
  63. 'repos'
  64. )
  65. REPOSPANNER_PSEUDO_FOLDER = os.path.join(
  66. os.path.abspath(os.path.dirname(__file__)),
  67. '..',
  68. 'pseudo'
  69. )
  70. ### Folder containing the clones for the remote pull-requests
  71. REMOTE_GIT_FOLDER = os.path.join(
  72. os.path.abspath(os.path.dirname(__file__)),
  73. '..',
  74. 'remotes'
  75. )
  76. ### Whether to enable scanning for viruses in attachments
  77. VIRUS_SCAN_ATTACHMENTS = False
  78. ### Configuration file for gitolite
  79. GITOLITE_CONFIG = os.path.join(
  80. os.path.abspath(os.path.dirname(__file__)),
  81. '..',
  82. 'gitolite.conf'
  83. )
  84. ### Home folder of the gitolite user
  85. ### Folder where to run gl-compile-conf from
  86. GITOLITE_HOME = None
  87. ### Version of gitolite used: 2 or 3?
  88. GITOLITE_VERSION = 3
  89. ### Folder containing all the public ssh keys for gitolite
  90. GITOLITE_KEYDIR = None
  91. ### Path to the gitolite.rc file
  92. GL_RC = None
  93. ### Path to the /bin directory where the gitolite tools can be found
  94. GL_BINDIR = None
  95. # SSH Information
  96. ### The ssh certificates of the git server to be provided to the user
  97. ### /!\ format is important
  98. # SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}}
  99. # Optional configuration
  100. ### Number of items displayed per page
  101. # Used when listing items
  102. ITEM_PER_PAGE = 50
  103. ### Maximum size of the uploaded content
  104. # Used to limit the size of file attached to a ticket for example
  105. MAX_CONTENT_LENGTH = 4 * 1024 * 1024 # 4 megabytes
  106. ### Lenght for short commits ids or file hex
  107. SHORT_LENGTH = 6
  108. ### List of blacklisted project names that can conflicts for pagure's URLs
  109. ### or other
  110. BLACKLISTED_PROJECTS = [
  111. 'static', 'pv', 'releases', 'new', 'api', 'settings',
  112. 'logout', 'login', 'users', 'groups', 'projects']
  113. ### IP addresses allowed to access the internal endpoints
  114. ### These endpoints are used by the milter and are security sensitive, thus
  115. ### the IP filter
  116. IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1']
  117. ### EventSource/Web-Hook/Redis configuration
  118. # The eventsource integration is what allows pagure to refresh the content
  119. # on your page when someone else comments on the ticket (and this without
  120. # asking you to reload the page.
  121. # By default it is off, ie: EVENTSOURCE_SOURCE is None, to turn it on, specify
  122. # here what the URL of the eventsource server is, for example:
  123. # https://ev.pagure.io or https://pagure.io:8080 or whatever you are using
  124. # (Note: the urls sent to it start with a '/' so no need to add one yourself)
  125. EVENTSOURCE_SOURCE = None
  126. # Port where the event source server is running (maybe be the same port
  127. # as the one specified in EVENTSOURCE_SOURCE or a different one if you
  128. # have something running in front of the server such as apache or stunnel).
  129. EVENTSOURCE_PORT = 8080
  130. # If this port is specified, the event source server will run another server
  131. # at this port and will provide information about the number of active
  132. # connections running on the first (main) event source server
  133. #EV_STATS_PORT = 8888
  134. # Web-hook can be turned on or off allowing using them for notifications, or
  135. # not.
  136. WEBHOOK = False
  137. ### Redis configuration
  138. # A redis server is required for both the Event-Source server or the web-hook
  139. # server.
  140. REDIS_HOST = '0.0.0.0'
  141. REDIS_PORT = 6379
  142. REDIS_DB = 0
  143. # Authentication related configuration option
  144. ### Switch the authentication method
  145. # Specify which authentication method to use.
  146. # Available options: `fas`, `openid`, `oidc`, `local`
  147. # Default: ``local``.
  148. PAGURE_AUTH = 'local'
  149. # When this is set to True, the session cookie will only be returned to the
  150. # server via ssl (https). If you connect to the server via plain http, the
  151. # cookie will not be sent. This prevents sniffing of the cookie contents.
  152. # This may be set to False when testing your application but should always
  153. # be set to True in production.
  154. # Default: ``True``.
  155. SESSION_COOKIE_SECURE = False
  156. # The name of the cookie used to store the session id.
  157. # Default: ``.pagure``.
  158. SESSION_COOKIE_NAME = 'pagure'
  159. # Boolean specifying whether to check the user's IP address when retrieving
  160. # its session. This make things more secure (thus is on by default) but
  161. # under certain setup it might not work (for example is there are proxies
  162. # in front of the application).
  163. CHECK_SESSION_IP = True
  164. # Used by SESSION_COOKIE_PATH
  165. APPLICATION_ROOT = '/'
  166. # Allow the backward compatiblity endpoints for the old URLs schema to
  167. # see the commits of a repo. This is only interesting if you pagure instance
  168. # was running since before version 1.3 and if you care about backward
  169. # compatibility in your URLs.
  170. OLD_VIEW_COMMIT_ENABLED = False
  171. # repoSpanner integration settings
  172. # https://repospanner.org/
  173. # Whether to create new repositories on repoSpanner by default.
  174. # Either None or a region name.
  175. REPOSPANNER_NEW_REPO = None
  176. # Whether to allow admins to override region selection on creation.
  177. REPOSPANNER_NEW_REPO_ADMIN_OVERRIDE = False
  178. # Whether to create new forks on repoSpanner.
  179. # Either None (no repoSpanner), True (same as origin project) or a region name.
  180. REPOSPANNER_NEW_FORK = True
  181. # Whether to allow an admin to manually migrate an individual project.
  182. REPOSPANNER_ADMIN_MIGRATION = False
  183. # The repoSpanner regions to be used in this Pagure instance.
  184. # Example entry:
  185. # 'default': {'url': 'https://nodea.regiona.repospanner.local:8444',
  186. # 'repo_prefix': 'pagure/',
  187. # 'hook': None,
  188. # 'ca': '',
  189. # 'admin_cert': {'cert': '',
  190. # 'key': ''},
  191. # 'push_cert': {'cert': '',
  192. # 'key': ''}}
  193. REPOSPANNER_REGIONS = {}
  194. # Path to the plugins configuration file that is used to load plugins. Please
  195. # look at files/plugins.cfg.sample for a configuration example.
  196. # PAGURE_PLUGINS_CONFIG = "/etc/pagure/plugins.cfg"