pagure.cfg 5.9 KB

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