| import os |
| from datetime import timedelta |
|
|
| # |
| # There are two sessions on pagure, login that holds for 31 days and |
| # the session defined here after which an user has to re-login. |
| # This session is used when accessing all administrative parts of pagure |
| # (ie: changing a project's or a user's settings) |
| ADMIN_SESSION_LIFETIME = timedelta(minutes=20) |
|
|
| # |
| SECRET_KEY='<The web application secret key>' |
|
|
| # |
| #DB_URL=mysql://user:pass@host/db_name |
| #DB_URL=postgres://user:pass@host/db_name |
| DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite' |
|
|
| # |
| ADMIN_GROUP = ['sysadmin-main'] |
|
|
| # |
| EMAIL_ERROR = 'pingou@pingoured.fr' |
|
|
| # |
| SMTP_SERVER = 'localhost' |
|
|
| # |
| FROM_EMAIL = 'pagure@pagure.io' |
| DOMAIN_EMAIL_NOTIFICATIONS = 'pagure.io' |
| SALT_EMAIL = '<secret key to be changed>' |
|
|
| # |
| APP_URL = 'https://pagure.io/' |
| # |
| # |
| # |
| DOC_APP_URL = 'https://docs.pagure.org' |
|
|
| # |
| GIT_URL_SSH = 'ssh://git@pagure.io/' |
| GIT_URL_GIT = 'git://pagure.io/' |
|
|
| # |
| GIT_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'repos' |
| ) |
|
|
| # |
| FORK_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'forks' |
| ) |
|
|
| # |
| DOCS_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'docs' |
| ) |
|
|
| # |
| TICKETS_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'tickets' |
| ) |
|
|
| # |
| REQUESTS_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'requests' |
| ) |
|
|
| # |
| REMOTE_GIT_FOLDER = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'remotes' |
| ) |
|
|
| |
| # |
| GITOLITE_CONFIG = os.path.join( |
| os.path.abspath(os.path.dirname(__file__)), |
| '..', |
| 'gitolite.conf' |
| ) |
|
|
| |
| # |
| # |
| GITOLITE_HOME = None |
|
|
| # |
| GITOLITE_VERSION = 3 |
|
|
| # |
| GITOLITE_KEYDIR = None |
|
|
| # |
| GL_RC = None |
|
|
| # |
| GL_BINDIR = None |
|
|
| |
| # SSH Information |
|
|
| # |
| # |
| # SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}} |
|
|
| |
| |
| # Optional configuration |
|
|
| # |
| # Used when listing items |
| ITEM_PER_PAGE = 50 |
|
|
| # |
| # Used to limit the size of file attached to a ticket for example |
| MAX_CONTENT_LENGTH = 4 * 1024 * 1024 # 4 megabytes |
|
|
| # |
| SHORT_LENGTH = 6 |
|
|
| # |
| # |
| BLACKLISTED_PROJECTS = [ |
| 'static', 'pv', 'releases', 'new', 'api', 'settings', |
| 'logout', 'login', 'users', 'groups', 'projects'] |
|
|
| # |
| # |
| # |
| IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1'] |
|
|
| # |
| # The eventsource integration is what allows pagure to refresh the content |
| # on your page when someone else comments on the ticket (and this without |
| # asking you to reload the page. |
| # By default it is off, ie: EVENTSOURCE_SOURCE is None, to turn it on, specify |
| # here what the URL of the eventsource server is, for example: |
| # https://ev.pagure.io or https://pagure.io:8080 or whatever you are using |
| # (Note: the urls sent to it start with a '/' so no need to add one yourself) |
| EVENTSOURCE_SOURCE = None |
| # Port where the event source server is running (maybe be the same port |
| # as the one specified in EVENTSOURCE_SOURCE or a different one if you |
| # have something running in front of the server such as apache or stunnel). |
| EVENTSOURCE_PORT = 8080 |
| # If this port is specified, the event source server will run another server |
| # at this port and will provide information about the number of active |
| # connections running on the first (main) event source server |
| #EV_STATS_PORT = 8888 |
| # Web-hook can be turned on or off allowing using them for notifications, or |
| # not. |
| WEBHOOK = False |
|
|
| # |
| # A redis server is required for both the Event-Source server or the web-hook |
| # server. |
| REDIS_HOST = '0.0.0.0' |
| REDIS_PORT = 6379 |
| REDIS_DB = 0 |
|
|
| # Authentication related configuration option |
|
|
| # |
| # Specify which authentication method to use, defaults to `fas` can be or |
| # `local` |
| # Default: ``fas``. |
| PAGURE_AUTH = 'fas' |
|
|
| # When this is set to True, the session cookie will only be returned to the |
| # server via ssl (https). If you connect to the server via plain http, the |
| # cookie will not be sent. This prevents sniffing of the cookie contents. |
| # This may be set to False when testing your application but should always |
| # be set to True in production. |
| # Default: ``True``. |
| SESSION_COOKIE_SECURE = False |
|
|
| # The name of the cookie used to store the session id. |
| # Default: ``.pagure``. |
| SESSION_COOKIE_NAME = 'pagure' |
|
|
| # Boolean specifying wether to check the user's IP address when retrieving |
| # its session. This make things more secure (thus is on by default) but |
| # under certain setup it might not work (for example is there are proxies |
| # in front of the application). |
| CHECK_SESSION_IP = True |
|
|
| # Used by SESSION_COOKIE_PATH |
| APPLICATION_ROOT = '/' |