|
Pierre-Yves Chibon |
e91bef |
import os
|
|
Pierre-Yves Chibon |
f31b10 |
from datetime import timedelta
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
Pierre-Yves Chibon |
771fcc |
# There are two sessions on pagure, login that holds for 31 days and
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# This session is used when accessing all administrative parts of pagure
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
ADMIN_SESSION_LIFETIME = timedelta(minutes=20)
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Slavek Kabrda |
adea20 |
# Enable tickets and docs for all repos
|
|
Slavek Kabrda |
adea20 |
ENABLE_TICKETS = True
|
|
Slavek Kabrda |
adea20 |
ENABLE_DOCS = True
|
|
Slavek Kabrda |
adea20 |
|
|
Neal Gompa |
3c09f6 |
# Enables / Disables private projects
|
|
Neal Gompa |
3c09f6 |
PRIVATE_PROJECTS = True
|
|
Neal Gompa |
3c09f6 |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
Pierre-Yves Chibon |
9a6466 |
SECRET_KEY='<the application="" key="" secret="" web="">'</the>
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
Neal Gompa |
912c4d |
#DB_URL = 'mysql://user:pass@host/db_name'
|
|
Neal Gompa |
912c4d |
#DB_URL = 'postgres://user:pass@host/db_name'
|
|
Pierre-Yves Chibon |
fe5017 |
DB_URL = 'sqlite:////var/tmp/pagure_dev.sqlite'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Neal Gompa |
f3525c |
#
|
|
Neal Gompa |
f3525c |
FEDMSG_NOTIFICATIONS = False
|
|
Neal Gompa |
f3525c |
|
|
Pierre-Yves Chibon |
fe5017 |
#
|
|
Pierre-Yves Chibon |
771fcc |
ADMIN_GROUP = ['sysadmin-main']
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
1abf96 |
#
|
|
Pierre-Yves Chibon |
1abf96 |
PAGURE_ADMIN_USERS = []
|
|
Pierre-Yves Chibon |
1abf96 |
|
|
Luis Guzman |
d9103b |
#
|
|
Luis Guzman |
d9103b |
EMAIL_SEND = False
|
|
Luis Guzman |
d9103b |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
Neal Gompa |
9c34c4 |
EMAIL_ERROR = 'root@localhost'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Vivek Anand |
2bb937 |
#
|
|
Pierre-Yves Chibon |
771fcc |
SMTP_SERVER = 'localhost'
|
|
Vyacheslav Anzhiganov |
3f9d9d |
SMTP_PORT = 25
|
|
Vyacheslav Anzhiganov |
3f9d9d |
SMTP_SSL = False
|
|
Vivek Anand |
2bb937 |
|
|
Vivek Anand |
2bb937 |
#Specify both for enabling SMTP with auth
|
|
Vyacheslav Anzhiganov |
3f9d9d |
SMTP_USERNAME = None
|
|
Vyacheslav Anzhiganov |
3f9d9d |
SMTP_PASSWORD = None
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
3bcdaf |
#
|
|
Neal Gompa |
9c34c4 |
FROM_EMAIL = 'pagure@localhost.localdomain'
|
|
Neal Gompa |
9c34c4 |
DOMAIN_EMAIL_NOTIFICATIONS = 'localhost.localdomain'
|
|
Pierre-Yves Chibon |
3bcdaf |
SALT_EMAIL = '<secret be="" changed="" key="" to="">'</secret>
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Karsten Hopp |
5c0db6 |
#
|
|
Karsten Hopp |
5c0db6 |
#
|
|
Karsten Hopp |
5c0db6 |
#
|
|
Karsten Hopp |
5c0db6 |
#
|
|
Karsten Hopp |
5c0db6 |
# ALLOWED_EMAIL_DOMAINS = [ 'localhost.localdomain', 'example.com' ]
|
|
Karsten Hopp |
5c0db6 |
|
|
Karsten Hopp |
9f48c1 |
#
|
|
Karsten Hopp |
9f48c1 |
#
|
|
Karsten Hopp |
9f48c1 |
#
|
|
Karsten Hopp |
9f48c1 |
DISABLE_REMOTE_PR = False
|
|
Karsten Hopp |
9f48c1 |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
Neal Gompa |
9c34c4 |
APP_URL = 'http://localhost.localdomain/'
|
|
Pierre-Yves Chibon |
84571a |
#
|
|
Pierre-Yves Chibon |
84571a |
#
|
|
Pierre-Yves Chibon |
ce5b28 |
#
|
|
Neal Gompa |
9c34c4 |
DOC_APP_URL = 'http://docs.localhost.localdomain'
|
|
Pierre-Yves Chibon |
e4b805 |
|
|
Pierre-Yves Chibon |
e4b805 |
#
|
|
Neal Gompa |
9c34c4 |
GIT_URL_SSH = 'ssh://git@localhost.localdomain/'
|
|
Neal Gompa |
9c34c4 |
GIT_URL_GIT = 'git://localhost.localdomain/'
|
|
Pierre-Yves Chibon |
9a6466 |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
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 |
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_PSEUDO_FOLDER = os.path.join(
|
|
Patrick Uiterwijk |
3f97f6 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Patrick Uiterwijk |
3f97f6 |
'..',
|
|
Patrick Uiterwijk |
3f97f6 |
'pseudo'
|
|
Patrick Uiterwijk |
3f97f6 |
)
|
|
Patrick Uiterwijk |
3f97f6 |
|
|
Pierre-Yves Chibon |
cac3b5 |
#
|
|
Pierre-Yves Chibon |
cac3b5 |
REMOTE_GIT_FOLDER = os.path.join(
|
|
Pierre-Yves Chibon |
cac3b5 |
os.path.abspath(os.path.dirname(__file__)),
|
|
Pierre-Yves Chibon |
cac3b5 |
'..',
|
|
Pierre-Yves Chibon |
cac3b5 |
'remotes'
|
|
Pierre-Yves Chibon |
cac3b5 |
)
|
|
Pierre-Yves Chibon |
cac3b5 |
|
|
Patrick Uiterwijk |
78afb3 |
#
|
|
Patrick Uiterwijk |
78afb3 |
VIRUS_SCAN_ATTACHMENTS = False
|
|
Patrick Uiterwijk |
78afb3 |
|
|
Pierre-Yves Chibon |
cac3b5 |
|
|
Pierre-Yves Chibon |
9a6466 |
#
|
|
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 |
#
|
|
Pierre-Yves Chibon |
156357 |
#
|
|
Pierre-Yves Chibon |
156357 |
GITOLITE_HOME = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
66faf5 |
#
|
|
Pierre-Yves Chibon |
d0272c |
GITOLITE_VERSION = 3
|
|
Pierre-Yves Chibon |
66faf5 |
|
|
Pierre-Yves Chibon |
156357 |
#
|
|
Pierre-Yves Chibon |
156357 |
GITOLITE_KEYDIR = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
#
|
|
Pierre-Yves Chibon |
156357 |
GL_RC = None
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
156357 |
#
|
|
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 |
#
|
|
Pierre-Yves Chibon |
3adf88 |
#
|
|
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 |
#
|
|
Pierre-Yves Chibon |
771fcc |
# Used when listing items
|
|
Pierre-Yves Chibon |
771fcc |
ITEM_PER_PAGE = 50
|
|
Pierre-Yves Chibon |
156357 |
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
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
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
Pierre-Yves Chibon |
771fcc |
SHORT_LENGTH = 6
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
Pierre-Yves Chibon |
5b2543 |
BLACKLISTED_PROJECTS = [
|
|
Pierre-Yves Chibon |
5b2543 |
'static', 'pv', 'releases', 'new', 'api', 'settings',
|
|
Gaurav Kumar |
ca8e11 |
'logout', 'login', 'users', 'groups', 'projects']
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
77273a |
#
|
|
Pierre-Yves Chibon |
77273a |
#
|
|
Pierre-Yves Chibon |
77273a |
#
|
|
Pierre-Yves Chibon |
77273a |
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1']
|
|
Pierre-Yves Chibon |
77273a |
|
|
Pierre-Yves Chibon |
5b2543 |
#
|
|
Pierre-Yves Chibon |
509340 |
|
|
Pierre-Yves Chibon |
509340 |
|
|
Pierre-Yves Chibon |
509340 |
|
|
Pierre-Yves Chibon |
4fb0af |
# By default it is off, ie: EVENTSOURCE_SOURCE is None, to turn it on, specify
|
|
Pierre-Yves Chibon |
4fb0af |
|
|
Pierre-Yves Chibon |
4fb0af |
# https://ev.pagure.io or https://pagure.io:8080 or whatever you are using
|
|
Pierre-Yves Chibon |
4c012f |
|
|
Pierre-Yves Chibon |
509340 |
EVENTSOURCE_SOURCE = None
|
|
Pierre-Yves Chibon |
bbab7a |
# Port where the event source server is running (maybe be the same port
|
|
Pierre-Yves Chibon |
bbab7a |
|
|
Pierre-Yves Chibon |
bbab7a |
|
|
Pierre-Yves Chibon |
bbab7a |
EVENTSOURCE_PORT = 8080
|
|
Pierre-Yves Chibon |
134f0e |
|
|
Pierre-Yves Chibon |
134f0e |
|
|
Pierre-Yves Chibon |
134f0e |
# connections running on the first (main) event source server
|
|
Pierre-Yves Chibon |
134f0e |
#EV_STATS_PORT = 8888
|
|
Pierre-Yves Chibon |
5b2543 |
# Web-hook can be turned on or off allowing using them for notifications, or
|
|
Pierre-Yves Chibon |
5b2543 |
# not.
|
|
Pierre-Yves Chibon |
5b2543 |
WEBHOOK = False
|
|
Pierre-Yves Chibon |
5b2543 |
|
|
Pierre-Yves Chibon |
5b2543 |
#
|
|
Pierre-Yves Chibon |
5b2543 |
|
|
Pierre-Yves Chibon |
5b2543 |
# server.
|
|
Pierre-Yves Chibon |
5b2543 |
REDIS_HOST = '0.0.0.0'
|
|
Pierre-Yves Chibon |
5b2543 |
REDIS_PORT = 6379
|
|
Pierre-Yves Chibon |
5b2543 |
REDIS_DB = 0
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
# Authentication related configuration option
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
#
|
|
Neal Gompa |
8bcba6 |
# Specify which authentication method to use.
|
|
Neal Gompa |
8bcba6 |
# Available options: `fas`, `openid`, `oidc`, `local`
|
|
Neal Gompa |
8bcba6 |
# Default: ``local``.
|
|
Neal Gompa |
8bcba6 |
PAGURE_AUTH = 'local'
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
|
|
Pierre-Yves Chibon |
771fcc |
|
|
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 |
|
|
Pierre-Yves Chibon |
771fcc |
# Default: ``.pagure``.
|
|
Pierre-Yves Chibon |
771fcc |
SESSION_COOKIE_NAME = 'pagure'
|
|
Pierre-Yves Chibon |
771fcc |
|
|
bruno |
6fae38 |
|
|
Pierre-Yves Chibon |
771fcc |
|
|
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 = '/'
|
|
Pierre-Yves Chibon |
d642d8 |
|
|
Pierre-Yves Chibon |
d642d8 |
|
|
Pierre-Yves Chibon |
d642d8 |
|
|
Pierre-Yves Chibon |
50c52b |
# was running since before version 1.3 and if you care about backward
|
|
Pierre-Yves Chibon |
d642d8 |
# compatibility in your URLs.
|
|
Pierre-Yves Chibon |
d642d8 |
OLD_VIEW_COMMIT_ENABLED = False
|
|
Patrick Uiterwijk |
3f97f6 |
|
|
Patrick Uiterwijk |
3f97f6 |
# repoSpanner integration settings
|
|
Patrick Uiterwijk |
3f97f6 |
# https://repospanner.org/
|
|
Patrick Uiterwijk |
3f97f6 |
# Whether to create new repositories on repoSpanner by default.
|
|
Patrick Uiterwijk |
3f97f6 |
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_NEW_REPO = None
|
|
Patrick Uiterwijk |
3f97f6 |
# Whether to allow admins to override region selection on creation.
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_NEW_REPO_ADMIN_OVERRIDE = False
|
|
Patrick Uiterwijk |
3f97f6 |
# Whether to create new forks on repoSpanner.
|
|
Patrick Uiterwijk |
3f97f6 |
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_NEW_FORK = True
|
|
Patrick Uiterwijk |
3f97f6 |
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_ADMIN_MIGRATION = False
|
|
Patrick Uiterwijk |
3f97f6 |
# The repoSpanner regions to be used in this Pagure instance.
|
|
Patrick Uiterwijk |
3f97f6 |
# Example entry:
|
|
Patrick Uiterwijk |
3f97f6 |
# 'default': {'url': 'https://nodea.regiona.repospanner.local:8444',
|
|
Patrick Uiterwijk |
3f97f6 |
# 'repo_prefix': 'pagure/',
|
|
Patrick Uiterwijk |
d29158 |
# 'hook': None,
|
|
Patrick Uiterwijk |
3f97f6 |
# 'ca': '',
|
|
Patrick Uiterwijk |
3f97f6 |
# 'admin_cert': {'cert': '',
|
|
Patrick Uiterwijk |
3f97f6 |
# 'key': ''},
|
|
Patrick Uiterwijk |
3f97f6 |
# 'push_cert': {'cert': '',
|
|
Patrick Uiterwijk |
3f97f6 |
# 'key': ''}}
|
|
Patrick Uiterwijk |
3f97f6 |
REPOSPANNER_REGIONS = {}
|