|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
771fcc |
### Set the time after which the admin session expires
|
|
Pierre-Yves Chibon |
771fcc |
# There are two sessions on pagure, login that holds for 31 days and
|
|
Pierre-Yves Chibon |
771fcc |
# the session defined here after which an user has to re-login.
|
|
Pierre-Yves Chibon |
771fcc |
# This session is used when accessing all administrative parts of pagure
|
|
Pierre-Yves Chibon |
771fcc |
# (ie: changing a project's or a user's settings)
|
|
Pierre-Yves Chibon |
771fcc |
ADMIN_SESSION_LIFETIME = timedelta(minutes=20)
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
9a6466 |
### Secret key for the Flask application
|
|
Pierre-Yves Chibon |
9a6466 |
SECRET_KEY='<the application="" key="" secret="" web="">'</the>
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### url to the database server:
|
|
Pierre-Yves Chibon |
9a6466 |
#DB_URL=mysql://user:pass@host/db_name
|
|
Pierre-Yves Chibon |
9a6466 |
#DB_URL=postgres://user:pass@host/db_name
|
|
Pierre-Yves Chibon |
fe5017 |
DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
fe5017 |
### The FAS group in which the admin of pagure are
|
|
Pierre-Yves Chibon |
771fcc |
ADMIN_GROUP = ['sysadmin-main']
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### The email address to which the flask.log will send the errors (tracebacks)
|
|
Pierre-Yves Chibon |
9a6466 |
EMAIL_ERROR = 'pingou@pingoured.fr'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
771fcc |
### Default SMTP server to use for sending emails
|
|
Pierre-Yves Chibon |
771fcc |
SMTP_SERVER = 'localhost'
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
3bcdaf |
### Information used to sent notifications
|
|
Pierre-Yves Chibon |
771fcc |
FROM_EMAIL = 'pagure@pagure.io'
|
|
Pierre-Yves Chibon |
3bcdaf |
DOMAIN_EMAIL_NOTIFICATIONS = 'pagure.io'
|
|
Pierre-Yves Chibon |
3bcdaf |
SALT_EMAIL = '<secret be="" changed="" key="" to="">'</secret>
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
9a6466 |
### The URL at which the project is available.
|
|
Pierre-Yves Chibon |
771fcc |
APP_URL = 'https://pagure.io/'
|
|
Pierre-Yves Chibon |
84571a |
### The URL at which the documentation of projects will be available
|
|
Pierre-Yves Chibon |
84571a |
## This should be in a different domain to avoid XSS issues since we want
|
|
Pierre-Yves Chibon |
ce5b28 |
## to allow raw html to be displayed (different domain, ie not a sub-domain).
|
|
Pierre-Yves Chibon |
84571a |
DOC_APP_URL = 'https://docs.pagure.org'
|
|
Pierre-Yves Chibon |
e4b805 |
|
|
Pierre-Yves Chibon |
e4b805 |
### The URL to use to clone git repositories.
|
|
Pierre-Yves Chibon |
771fcc |
GIT_URL_SSH = 'git@pagure.io'
|
|
Pierre-Yves Chibon |
771fcc |
GIT_URL_GIT = 'git://pagure.io'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### Folder containing to the git repos
|
|
Pierre-Yves Chibon |
9a6466 |
GIT_FOLDER = os.path.join(
|
|
Pierre-Yves Chibon |
9a6466 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
9a6466 |
'..',
|
|
Pierre-Yves Chibon |
9a6466 |
'repos'
|
|
Pierre-Yves Chibon |
9a6466 |
)
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### Folder containing the forks repos
|
|
Pierre-Yves Chibon |
9a6466 |
FORK_FOLDER = os.path.join(
|
|
Pierre-Yves Chibon |
9a6466 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
9a6466 |
'..',
|
|
Pierre-Yves Chibon |
9a6466 |
'forks'
|
|
Pierre-Yves Chibon |
9a6466 |
)
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### Folder containing the docs repos
|
|
Pierre-Yves Chibon |
9a6466 |
DOCS_FOLDER = os.path.join(
|
|
Pierre-Yves Chibon |
9a6466 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
9a6466 |
'..',
|
|
Pierre-Yves Chibon |
9a6466 |
'docs'
|
|
Pierre-Yves Chibon |
9a6466 |
)
|
|
Pierre-Yves Chibon |
771fcc |
### Folder containing the pull-requests repos
|
|
Pierre-Yves Chibon |
771fcc |
REQUESTS_FOLDER = os.path.join(
|
|
Pierre-Yves Chibon |
771fcc |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
771fcc |
'..',
|
|
Pierre-Yves Chibon |
771fcc |
'requests'
|
|
Pierre-Yves Chibon |
771fcc |
)
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
### Configuration file for gitolite
|
|
Pierre-Yves Chibon |
9a6466 |
GITOLITE_CONFIG = os.path.join(
|
|
Pierre-Yves Chibon |
9a6466 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
9a6466 |
'..',
|
|
Pierre-Yves Chibon |
9a6466 |
'gitolite.conf'
|
|
Pierre-Yves Chibon |
9a6466 |
)
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
### Home folder of the gitolite user
|
|
Pierre-Yves Chibon |
156357 |
### Folder where to run gl-compile-conf from
|
|
Pierre-Yves Chibon |
156357 |
GITOLITE_HOME = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
66faf5 |
### Version of gitolite used: 2 or 3?
|
|
Pierre-Yves Chibon |
d0272c |
GITOLITE_VERSION = 3
|
|
Pierre-Yves Chibon |
66faf5 |
|
|
Pierre-Yves Chibon |
156357 |
### Folder containing all the public ssh keys for gitolite
|
|
Pierre-Yves Chibon |
156357 |
GITOLITE_KEYDIR = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
### Path to the gitolite.rc file
|
|
Pierre-Yves Chibon |
156357 |
GL_RC = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
### Path to the /bin directory where the gitolite tools can be found
|
|
Pierre-Yves Chibon |
156357 |
GL_BINDIR = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
3adf88 |
# SSH Information
|
|
Pierre-Yves Chibon |
3adf88 |
|
|
Pierre-Yves Chibon |
3adf88 |
### The ssh certificates of the git server to be provided to the user
|
|
Pierre-Yves Chibon |
3adf88 |
### /!\ format is important
|
|
Pierre-Yves Chibon |
1d610d |
# SSH_KEYS = {'RSA': {'fingerprint': '<foo>', 'pubkey': '<bar>'}}</bar></foo>
|
|
Pierre-Yves Chibon |
3adf88 |
|
|
Pierre-Yves Chibon |
3adf88 |
|
|
Pierre-Yves Chibon |
3adf88 |
|
|
Pierre-Yves Chibon |
156357 |
# Optional configuration
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
771fcc |
### Number of items displayed per page
|
|
Pierre-Yves Chibon |
771fcc |
# Used when listing items
|
|
Pierre-Yves Chibon |
771fcc |
ITEM_PER_PAGE = 50
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
771fcc |
### Maximum size of the uploaded content
|
|
Pierre-Yves Chibon |
771fcc |
# Used to limit the size of file attached to a ticket for example
|
|
Pierre-Yves Chibon |
771fcc |
MAX_CONTENT_LENGTH = 4 * 1024 * 1024 # 4 megabytes
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
### Lenght for short commits ids or file hex
|
|
Pierre-Yves Chibon |
771fcc |
SHORT_LENGTH = 6
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
### List of blacklisted project names that can conflicts for pagure's URLs
|
|
Pierre-Yves Chibon |
771fcc |
### or other
|
|
Pierre-Yves Chibon |
771fcc |
BLACKLISTED_PROJECTS = ['static', 'pv']
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
77273a |
### IP addresses allowed to access the internal endpoints
|
|
Pierre-Yves Chibon |
77273a |
### These endpoints are used by the milter and are security sensitive, thus
|
|
Pierre-Yves Chibon |
77273a |
### the IP filter
|
|
Pierre-Yves Chibon |
77273a |
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1']
|
|
Pierre-Yves Chibon |
77273a |
|
|
Pierre-Yves Chibon |
509340 |
### EventSource/Redis configuration
|
|
Pierre-Yves Chibon |
509340 |
# The eventsource integration is what allows pagure to refresh the content
|
|
Pierre-Yves Chibon |
509340 |
# on your page when someone else comments on the ticket (and this without
|
|
Pierre-Yves Chibon |
509340 |
# asking you to reload the page.
|
|
Pierre-Yves Chibon |
4fb0af |
# By default it is off, ie: EVENTSOURCE_SOURCE is None, to turn it on, specify
|
|
Pierre-Yves Chibon |
4fb0af |
# here what the URL of the eventsource server is, for example:
|
|
Pierre-Yves Chibon |
4fb0af |
# https://ev.pagure.io or https://pagure.io:8080 or whatever you are using
|
|
Pierre-Yves Chibon |
4c012f |
# (Note: the urls sent to it start with a '/' so no need to add one yourself)
|
|
Pierre-Yves Chibon |
509340 |
EVENTSOURCE_SOURCE = None
|
|
Pierre-Yves Chibon |
509340 |
REDIS_HOST = '0.0.0.0'
|
|
Pierre-Yves Chibon |
509340 |
REDIS_PORT = 6379
|
|
Pierre-Yves Chibon |
509340 |
REDIS_DB = 0
|
|
Pierre-Yves Chibon |
bbab7a |
# Port where the event source server is running (maybe be the same port
|
|
Pierre-Yves Chibon |
bbab7a |
# as the one specified in EVENTSOURCE_SOURCE or a different one if you
|
|
Pierre-Yves Chibon |
bbab7a |
# have something running in front of the server such as apache or stunnel).
|
|
Pierre-Yves Chibon |
bbab7a |
EVENTSOURCE_PORT = 8080
|
|
Pierre-Yves Chibon |
134f0e |
# If this port is specified, the event source server will run another server
|
|
Pierre-Yves Chibon |
134f0e |
# at this port and will provide information about the number of active
|
|
Pierre-Yves Chibon |
134f0e |
# connections running on the first (main) event source server
|
|
Pierre-Yves Chibon |
134f0e |
#EV_STATS_PORT = 8888
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# Authentication related configuration option
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
### Switch the authentication method
|
|
Pierre-Yves Chibon |
771fcc |
# Specify which authentication method to use, defaults to `fas` can be or
|
|
Pierre-Yves Chibon |
771fcc |
# `local`
|
|
Pierre-Yves Chibon |
771fcc |
# Default: ``fas``.
|
|
Pierre-Yves Chibon |
771fcc |
PAGURE_AUTH = 'fas'
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# When this is set to True, the session cookie will only be returned to the
|
|
Pierre-Yves Chibon |
771fcc |
# server via ssl (https). If you connect to the server via plain http, the
|
|
Pierre-Yves Chibon |
771fcc |
# cookie will not be sent. This prevents sniffing of the cookie contents.
|
|
Pierre-Yves Chibon |
771fcc |
# This may be set to False when testing your application but should always
|
|
Pierre-Yves Chibon |
771fcc |
# be set to True in production.
|
|
Pierre-Yves Chibon |
771fcc |
# Default: ``True``.
|
|
Pierre-Yves Chibon |
771fcc |
SESSION_COOKIE_SECURE = False
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# The name of the cookie used to store the session id.
|
|
Pierre-Yves Chibon |
771fcc |
# Default: ``.pagure``.
|
|
Pierre-Yves Chibon |
771fcc |
SESSION_COOKIE_NAME = 'pagure'
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# Boolean specifying wether to check the user's IP address when retrieving
|
|
Pierre-Yves Chibon |
771fcc |
# its session. This make things more secure (thus is on by default) but
|
|
Pierre-Yves Chibon |
771fcc |
# under certain setup it might not work (for example is there are proxies
|
|
Pierre-Yves Chibon |
771fcc |
# in front of the application).
|
|
Pierre-Yves Chibon |
771fcc |
CHECK_SESSION_IP = True
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
771fcc |
# Used by SESSION_COOKIE_PATH
|
|
Pierre-Yves Chibon |
771fcc |
APPLICATION_ROOT = '/'
|