1
0

pagure.cfg.sample 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. ### Secret key for the Flask application
  10. SECRET_KEY='<The web application secret key>'
  11. ### url to the database server:
  12. #DB_URL=mysql://user:pass@host/db_name
  13. #DB_URL=postgres://user:pass@host/db_name
  14. DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
  15. ### The FAS group in which the admin of pagure are
  16. ADMIN_GROUP = ['sysadmin-main']
  17. ### Hard-coded list of global admins
  18. PAGURE_ADMIN_USERS = []
  19. ### The email address to which the flask.log will send the errors (tracebacks)
  20. EMAIL_ERROR = 'pingou@pingoured.fr'
  21. ### SMTP settings
  22. SMTP_SERVER = 'localhost'
  23. SMTP_PORT = 25
  24. SMTP_SSL = False
  25. #Specify both for enabling SMTP with auth
  26. SMTP_USERNAME = None
  27. SMTP_PASSWORD = None
  28. ### Information used to sent notifications
  29. FROM_EMAIL = 'pagure@pagure.io'
  30. DOMAIN_EMAIL_NOTIFICATIONS = 'pagure.io'
  31. SALT_EMAIL = '<secret key to be changed>'
  32. ### The URL at which the project is available.
  33. APP_URL = 'https://pagure.io/'
  34. ### The URL at which the documentation of projects will be available
  35. ## This should be in a different domain to avoid XSS issues since we want
  36. ## to allow raw html to be displayed (different domain, ie not a sub-domain).
  37. DOC_APP_URL = 'https://docs.pagure.org'
  38. ### The URL to use to clone git repositories.
  39. GIT_URL_SSH = 'ssh://git@pagure.io/'
  40. GIT_URL_GIT = 'git://pagure.io/'
  41. ### Folder containing to the git repos
  42. GIT_FOLDER = os.path.join(
  43. os.path.abspath(os.path.dirname(__file__)),
  44. '..',
  45. 'repos'
  46. )
  47. ### Folder containing the forks repos
  48. FORK_FOLDER = os.path.join(
  49. os.path.abspath(os.path.dirname(__file__)),
  50. '..',
  51. 'forks'
  52. )
  53. ### Folder containing the docs repos
  54. DOCS_FOLDER = os.path.join(
  55. os.path.abspath(os.path.dirname(__file__)),
  56. '..',
  57. 'docs'
  58. )
  59. ### Folder containing the tickets repos
  60. TICKETS_FOLDER = os.path.join(
  61. os.path.abspath(os.path.dirname(__file__)),
  62. '..',
  63. 'tickets'
  64. )
  65. ### Folder containing the pull-requests repos
  66. REQUESTS_FOLDER = os.path.join(
  67. os.path.abspath(os.path.dirname(__file__)),
  68. '..',
  69. 'requests'
  70. )
  71. ### Folder containing the clones for the remote pull-requests
  72. REMOTE_GIT_FOLDER = os.path.join(
  73. os.path.abspath(os.path.dirname(__file__)),
  74. '..',
  75. 'remotes'
  76. )
  77. ### Whether to enable scanning for viruses in attachments
  78. VIRUS_SCAN_ATTACHMENTS = False
  79. ### Configuration file for gitolite
  80. GITOLITE_CONFIG = os.path.join(
  81. os.path.abspath(os.path.dirname(__file__)),
  82. '..',
  83. 'gitolite.conf'
  84. )
  85. ### Home folder of the gitolite user
  86. ### Folder where to run gl-compile-conf from
  87. GITOLITE_HOME = None
  88. ### Version of gitolite used: 2 or 3?
  89. GITOLITE_VERSION = 3
  90. ### Folder containing all the public ssh keys for gitolite
  91. GITOLITE_KEYDIR = None
  92. ### Path to the gitolite.rc file
  93. GL_RC = None
  94. ### Path to the /bin directory where the gitolite tools can be found
  95. GL_BINDIR = None
  96. # SSH Information
  97. ### The ssh certificates of the git server to be provided to the user
  98. ### /!\ format is important
  99. # SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}}
  100. # Optional configuration
  101. ### Number of items displayed per page
  102. # Used when listing items
  103. ITEM_PER_PAGE = 50
  104. ### Maximum size of the uploaded content
  105. # Used to limit the size of file attached to a ticket for example
  106. MAX_CONTENT_LENGTH = 4 * 1024 * 1024 # 4 megabytes
  107. ### Lenght for short commits ids or file hex
  108. SHORT_LENGTH = 6
  109. ### List of blacklisted project names that can conflicts for pagure's URLs
  110. ### or other
  111. BLACKLISTED_PROJECTS = [
  112. 'static', 'pv', 'releases', 'new', 'api', 'settings',
  113. 'logout', 'login', 'users', 'groups', 'projects']
  114. ### IP addresses allowed to access the internal endpoints
  115. ### These endpoints are used by the milter and are security sensitive, thus
  116. ### the IP filter
  117. IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1']
  118. ### EventSource/Web-Hook/Redis configuration
  119. # The eventsource integration is what allows pagure to refresh the content
  120. # on your page when someone else comments on the ticket (and this without
  121. # asking you to reload the page.
  122. # By default it is off, ie: EVENTSOURCE_SOURCE is None, to turn it on, specify
  123. # here what the URL of the eventsource server is, for example:
  124. # https://ev.pagure.io or https://pagure.io:8080 or whatever you are using
  125. # (Note: the urls sent to it start with a '/' so no need to add one yourself)
  126. EVENTSOURCE_SOURCE = None
  127. # Port where the event source server is running (maybe be the same port
  128. # as the one specified in EVENTSOURCE_SOURCE or a different one if you
  129. # have something running in front of the server such as apache or stunnel).
  130. EVENTSOURCE_PORT = 8080
  131. # If this port is specified, the event source server will run another server
  132. # at this port and will provide information about the number of active
  133. # connections running on the first (main) event source server
  134. #EV_STATS_PORT = 8888
  135. # Web-hook can be turned on or off allowing using them for notifications, or
  136. # not.
  137. WEBHOOK = False
  138. ### Redis configuration
  139. # A redis server is required for both the Event-Source server or the web-hook
  140. # server.
  141. REDIS_HOST = '0.0.0.0'
  142. REDIS_PORT = 6379
  143. REDIS_DB = 0
  144. # Authentication related configuration option
  145. ### Switch the authentication method
  146. # Specify which authentication method to use, defaults to `fas` can be or
  147. # `local`
  148. # Default: ``fas``.
  149. PAGURE_AUTH = 'fas'
  150. # When this is set to True, the session cookie will only be returned to the
  151. # server via ssl (https). If you connect to the server via plain http, the
  152. # cookie will not be sent. This prevents sniffing of the cookie contents.
  153. # This may be set to False when testing your application but should always
  154. # be set to True in production.
  155. # Default: ``True``.
  156. SESSION_COOKIE_SECURE = False
  157. # The name of the cookie used to store the session id.
  158. # Default: ``.pagure``.
  159. SESSION_COOKIE_NAME = 'pagure'
  160. # Boolean specifying whether to check the user's IP address when retrieving
  161. # its session. This make things more secure (thus is on by default) but
  162. # under certain setup it might not work (for example is there are proxies
  163. # in front of the application).
  164. CHECK_SESSION_IP = True
  165. # Used by SESSION_COOKIE_PATH
  166. APPLICATION_ROOT = '/'
  167. # Allow the backward compatiblity endpoints for the old URLs schema to
  168. # see the commits of a repo. This is only interesting if you pagure instance
  169. # was running since before version 1.3 and if you care about backward
  170. # compatibility in your URLs.
  171. OLD_VIEW_COMMIT_ENABLED = False