Blob Blame History Raw
### python
import os
from   datetime              import timedelta
from   pagure.default_config import ACLS


### site meta
INSTANCE_NAME               = '@sitename@'
ADMIN_EMAIL                 = 'pagure@@sitezone@'
THEME                       = '@sitename@'


### pagure authentication
GIT_AUTH_BACKEND            = "pagure"
HTTP_REPO_ACCESS_GITOLITE   = None


### site options
DISABLE_REMOTE_PR           = False
ENABLE_NEW_PROJECTS         = True
ENABLE_UI_NEW_PROJECTS      = False
ENABLE_GROUP_MNGT           = False
ENABLE_TICKETS              = True
ENABLE_DOCS                 = True
ENABLE_DEL_PROJECTS         = False
ENABLE_DEL_FORKS            = True

# project options
PRIVATE_PROJECTS            = True


### flask
SECRET_KEY                  = '@pagure_flask_key@'


### pgsql
DB_URL                      = 'postgres://pagure:@pagure_pgsql_key@@localhost/pagure'

### site administration
FEDMSG_NOTIFICATIONS        = False
PAGURE_AUTH                 = 'local'
PAGURE_ADMIN_USERS          = ['@devadmin@']
ADMIN_GROUP                 = []
ADMIN_SESSION_LIFETIME      = timedelta(minutes=120)


USER_ACLS = [
    key
    for key in ACLS.keys()
        if key not in [
		'generate_acls_project',
		'internal_access',
		'create_project'
	]
]


ADMIN_API_ACLS = [
    'internal_access',
    'issue_comment',
    'issue_create',
    'issue_change_status',
    'pull_request_flag',
    'pull_request_comment',
    'pull_request_merge',
    'generate_acls_project',
    'commit_flag',
    'create_branch',
    'create_project',
    'tag_project',
]


### email options
EMAIL_ERROR                 = 'root@localhost'
EMAIL_SEND                  = True
VIRUS_SCAN_ATTACHMENTS      = False


### SMTP settings
SMTP_SERVER                 = 'smtp.@smtphost@'
SMTP_PORT                   = 25
SMTP_STARTTLS               = True
SMTP_SSL                    = False
SMTP_USERNAME               = None
SMTP_PASSWORD               = None

FROM_EMAIL                  = 'pagure@@sitezone@'
SALT_EMAIL                  = '@pagure_email_key@'
DOMAIN_EMAIL_NOTIFICATIONS  = '@sitezone@'


### web frontend
APP_URL                     = 'https://dev.@sitezone@'
DOC_APP_URL                 = 'https://docs.@docszone@'

SHORT_LENGTH                = 6
ITEM_PER_PAGE               = 50
MAX_CONTENT_LENGTH          = 4 * 1024 * 1024


### web backend
APPLICATION_ROOT            = '/'
SESSION_COOKIE_NAME         = 'pagure_at_@sitemask@'
SESSION_COOKIE_SECURE       = True
CHECK_SESSION_IP            = False
OLD_VIEW_COMMIT_ENABLED     = False


### git frontend
GIT_URL_SSH                 = 'ssh://git@@sitezone@:@ssh_port@/'
GIT_URL_GIT                 = 'https://dev.@sitezone@/'


### gunicorn
IP_ALLOWED_INTERNAL         = ['@vpn_ipv4@', '127.0.0.1', 'localhost', '::1', '']


### event source options
EVENTSOURCE_SOURCE          = None
EVENTSOURCE_PORT            = 8080
WEBHOOK                     = False


### redis configuration
REDIS_HOST                  = '127.0.0.1'
REDIS_PORT                  = 6379
REDIS_DB                    = 0


### attachments
ATTACHMENTS_FOLDER          = '/srv/pagure/attachments'


### mirroring
MIRROR_SSHKEYS_FOLDER       = '/srv/pagure/ssh_keys'


### git backend
GIT_FOLDER = os.path.join(
    '/srv',
    'pagure',
    'repositories'
)

REMOTE_GIT_FOLDER = os.path.join(
    '/srv',
    'pagure',
    'remotes'
)


### ssh
SSH_KEYS_USERNAME_EXPECT    = "git"

SSH_COMMAND_NON_REPOSPANNER = ([
    "/usr/bin/%(cmd)s",
    "/srv/pagure/repositories/%(reponame)s",
], {"GL_USER": "%(username)s"})


SSH_KEYS_OPTIONS = (
    'restrict,command="/usr/lib/pagure/aclchecker.py %(username)s"'
)