xoxys.gitea/templates/custom/conf/app.ini.j2

313 lines
11 KiB
Django/Jinja

#jinja2: lstrip_blocks: True
{{ ansible_managed | comment(decoration="; ")}}
APP_NAME = Gitea: Git with a cup of tea
RUN_USER = {{ gitea_user }}
RUN_MODE = {{ gitea_run_mode }}
[repository]
ROOT = {{ gitea_data_dir }}/repos
FORCE_PRIVATE = {{ gitea_repository_force_private | bool | lower }}
DEFAULT_PRIVATE = {{ gitea_repository_default_private }}
MAX_CREATION_LIMIT = {{ gitea_repository_creation_limit }}
PREFERRED_LICENSES = {{ gitea_repository_default_license | join(",") }}
DISABLE_HTTP_GIT = {{ 'false' if gitea_repository_http_enabled | bool else 'true' }}
{% if gitea_repository_access_control_allow_origin is defined and gitea_repository_access_control_allow_origin %}
ACCESS_CONTROL_ALLOW_ORIGIN = {{ gitea_repository_access_control_allow_origin }}
{% endif %}
USE_COMPAT_SSH_URI = {{ gitea_repository_use_compat_ssh_uri | bool | lower }}
ENABLE_PUSH_CREATE_USER = {{ gitea_repository_push_create_user_enabled | bool | lower }}
ENABLE_PUSH_CREATE_ORG = {{ gitea_repository_push_create_org_enabled | bool | lower }}
[repository.editor]
LINE_WRAP_EXTENSIONS = {{ gitea_repository_editor_line_wrap_ext | join(",") }}
PREVIEWABLE_FILE_MODES = markdown
[repository.upload]
{% if gitea_repository_upload_enabled | bool %}
ENABLED = true
{% if gitea_repository_upload_allowed_types %}
ALLOWED_TYPES = {{ gitea_repository_upload_allowed_types | join(",") }}
{% endif %}
FILE_MAX_SIZE = {{ gitea_repository_upload_max_filesize }}
MAX_FILES = {{ gitea_repository_upload_max_files }}
{% else %}
ENABLED = false
{% endif %}
[repository.pull-request]
WORK_IN_PROGRESS_PREFIXES = {{ gitea_repository_pr_wip_prefix | join(",") }}
CLOSE_KEYWORDS = {{ gitea_repository_pr_close_keyword | join(",") }}
REOPEN_KEYWORDS = {{ gitea_repository_pr_reopen_keyword | join(",") }}
[repository.issue]
LOCK_REASONS = {{ gitea_repository_issue_lock_reason | join(",") }}
[ui]
EXPLORE_PAGING_NUM = {{ gitea_ui_explore_paging_num }}
ISSUE_PAGING_NUM = {{ gitea_ui_issue_paging_num }}
FEED_MAX_COMMIT_NUM = {{ gitea_ui_feed_commit_num }}
GRAPH_MAX_COMMIT_NUM = {{ gitea_ui_graph_commit_num }}
CODE_COMMENT_LINES = {{ gitea_ui_code_comment_lines }}
SHOW_USER_EMAIL = {{ gitea_ui_show_user_email | bool | lower }}
REACTIONS = {{ gitea_ui_reaction | join(",") }}
DEFAULT_SHOW_FULL_NAME = {{ gitea_ui_show_full_name | bool | lower }}
SEARCH_REPO_DESCRIPTION = {{ gitea_ui_search_repo_description | bool | lower }}
[ui.admin]
USER_PAGING_NUM = {{ gitea_ui_admin_user_paging_num }}
REPO_PAGING_NUM = {{ gitea_ui_admin_repo_paging_num }}
NOTICE_PAGING_NUM = {{ gitea_ui_admin_notice_paging_num }}
ORG_PAGING_NUM = {{ gitea_ui_admin_org_paging_num }}
[ui.user]
REPO_PAGING_NUM = {{ gitea_ui_user_repo_paging_num }}
[markdown]
ENABLE_HARD_LINE_BREAK = {{ gitea_markdown_hard_linebreak_enabled | bool | lower }}
{% if gitea_markdown_custom_url_scheme %}
CUSTOM_URL_SCHEMES = {{ gitea_markdown_custom_url_scheme | join(",") }}
{% endif %}
FILE_EXTENSIONS = {{ gitea_markdown_file_ext | join(",") }}
[server]
PROTOCOL = {{ 'https' if gitea_tls_enabled else 'http' }}
DOMAIN = {{ gitea_listen_address | urlsplit('hostname') }}
ROOT_URL = {{ gitea_listen_address | urlsplit('scheme') }}://%(DOMAIN)s/
HTTP_ADDR = {{ gitea_bind_ip }}
HTTP_PORT = {{ gitea_bind_port }}
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
DISABLE_SSH = {{ 'false' if gitea_ssh_enabled | bool else 'true' }}
START_SSH_SERVER = false
MINIMUM_KEY_SIZE_CHECK = {{ gitea_minimum_keysize_check | bool | lower }}
OFFLINE_MODE = {{ gitea_offline_mode | bool | lower }}
{% if gitea_tls_enabled | bool %}
CERT_FILE = {{ gitea_tls_cert_path }}
KEY_FILE = {{ gitea_tls_key_path }}
{% endif %}
APP_DATA_PATH = {{ gitea_data_dir }}
PPROF_DATA_PATH = {{ gitea_data_dir }}/tmp/pprof
LANDING_PAGE = {{ gitea_landing_page }}
{% if gitea_lfs_enabled | bool %}
LFS_START_SERVER = true
LFS_CONTENT_PATH = {{ gitea_data_dir }}/lfs
LFS_JWT_SECRET = {{ gitea_lfs_jwt_secret }}
LFS_HTTP_AUTH_EXPIRY = 20m
{% else %}
LFS_START_SERVER = false
{% endif %}
[ssh.minimum_key_sizes]
{% for key in gitea_minimum_keysize %}
{{ key.name }} = {{ key.size }}
{% endfor %}
[database]
{% if gitea_db_type == "pgsql" %}
DB_TYPE = postgres
HOST = {{ gitea_db_server }}:{{ gitea_db_port }}
NAME = {{ gitea_db_name }}
USER = {{ gitea_db_user }}
PASSWD = {{ gitea_db_password }}
SSL_MODE = {{ gitea_db_ssl_mode }}
{% elif gitea_db_type == "sqlite" %}
DB_TYPE = sqlite3
PATH = {{ gitea_data_dir }}/gitea.db
SQLITE_TIMEOUT = 500
{% endif %}
[indexer]
ISSUE_INDEXER_TYPE = bleve
ISSUE_INDEXER_PATH = {{ gitea_data_dir }}/indexers/issues.bleve
ISSUE_INDEXER_QUEUE_DIR = {{ gitea_data_dir }}/issues.queue
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = {{ gitea_data_dir }}/indexers/repos.bleve
[admin]
DISABLE_REGULAR_ORG_CREATION = {{ 'false' if gitea_org_creation_enabled | bool else 'true' }}
DEFAULT_EMAIL_NOTIFICATIONS = {{ gitea_default_email_notification }}
[webhook]
QUEUE_LENGTH = 1000
DELIVER_TIMEOUT = 5
ALLOWED_HOST_LIST = {{ gitea_webhook_allowed_host_list | join(",") }}
SKIP_TLS_VERIFY = false
[security]
INSTALL_LOCK = {{ gitea_install_lock | bool | lower }}
SECRET_KEY = {{ gitea_secret }}
LOGIN_REMEMBER_DAYS = {{ gitea_login_remember_days }}
MIN_PASSWORD_LENGTH = {{ gitea_password_min_lenght }}
DISABLE_GIT_HOOKS = {{ 'false' if gitea_git_hooks_enabled | bool else 'true' }}
PASSWORD_COMPLEXITY = {{ gitea_password_complexity | join(",") }}
PASSWORD_HASH_ALGO = pbkdf2
INTERNAL_TOKEN = {{ gitea_token }}
[service]
REGISTER_EMAIL_CONFIRM = {{ gitea_registration_email_confirm | bool | lower }}
{% if gitea_registration_email_domain_whitelist is defined and gitea_registration_email_domain_whitelist %}
EMAIL_DOMAIN_WHITELIST= {{ gitea_registration_email_domain_whitelist | join(",") }}
{% endif %}
DISABLE_REGISTRATION = {{ 'false' if gitea_registration_enabled | bool else 'true' }}
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_registration_allow_external_only | bool | lower }}
REQUIRE_SIGNIN_VIEW = false
{% if gitea_mail_service_enabled | bool %}
ENABLE_NOTIFY_MAIL = true
{% endif %}
ENABLE_BASIC_AUTHENTICATION = true
ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
ENABLE_USER_HEATMAP = true
ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = {{ gitea_no_reply_address }}
SHOW_REGISTRATION_BUTTON = {{ gitea_registration_button_enabled | bool | lower }}
SHOW_MILESTONES_DASHBOARD_PAGE = true
AUTO_WATCH_NEW_REPOS = {{ gitea_repository_auto_watch_on_creation | bool | lower }}
AUTO_WATCH_ON_CHANGES = {{ gitea_repository_auto_watch_on_change | bool | lower }}
DEFAULT_KEEP_EMAIL_PRIVATE = {{ gitea_default_keep_email_private | bool | lower }}
DEFAULT_ALLOW_CREATE_ORGANIZATION = {{ gitea_default_org_allow_creation | bool | lower }}
DEFAULT_ORG_VISIBILITY = {{ gitea_default_org_visible }}
DEFAULT_ORG_MEMBER_VISIBLE = {{ gitea_default_org_member_visible | bool | lower }}
DEFAULT_ENABLE_DEPENDENCIES = {{ gitea_default_dependencies_enabled | bool | lower }}
DEFAULT_ENABLE_TIMETRACKING = {{ gitea_default_timetracking_enabled | bool | lower }}
DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
{% if gitea_mail_service_enabled | bool %}
[mailer]
ENABLED = true
{% if gitea_mail_subject_prefix is defined and gitea_mail_subject_prefix %}
SUBJECT_PREFIX = {{ gitea_mail_subject_prefix }}
{% endif %}
FROM = {{ gitea_mail_service_from }}
MAILER_TYPE = sendmail
SENDMAIL_PATH = /usr/sbin/sendmail
{% else %}
[mailer]
ENABLED = false
{% endif %}
[session]
PROVIDER = {{ gitea_session_provider }}
PROVIDER_CONFIG = "{{ gitea_session_provider_config }}"
COOKIE_NAME = {{ gitea_session_cookie_name }}
COOKIE_SECURE = {{ gitea_session_cookie_secure | bool | lower }}
ENABLE_SET_COOKIE = {{ gitea_session_enable_set_cookie | bool | lower }}
GC_INTERVAL_TIME = {{ gitea_session_session_life_time }}
SESSION_LIFE_TIME = {{ gitea_session_session_life_time }}
[picture]
AVATAR_UPLOAD_PATH = {{ gitea_data_dir }}/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = {{ gitea_data_dir }}/repo-avatars
REPOSITORY_AVATAR_FALLBACK = none
DISABLE_GRAVATAR = {{ 'false' if gitea_gravatar_enabled | bool else 'true' }}
GRAVATAR_SOURCE = {{ gitea_gravatar_source }}
ENABLE_FEDERATED_AVATAR = {{ gitea_avatar_federation_enabled | bool | lower }}
[attachment]
{% if gitea_attachment_enabled | bool %}
ENABLE = true
PATH = {{ gitea_data_dir }}/attachments
ALLOWED_TYPES = {{ gitea_attachment_allowed_types | join("|") }}
MAX_SIZE = {{ gitea_attachment_max_filesize }}
MAX_FILES = {{ gitea_attachment_max_files }}
{% else %}
ENABLE = false
{% endif %}
[log]
ROOT_PATH = {{ gitea_log_dir }}
MODE = file
REDIRECT_MACARON_LOG = true
MACARON = file
ROUTER_LOG_LEVEL = Info
ROUTER = file
ENABLE_ACCESS_LOG = true
{% raw %}
ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
{% endraw %}
ACCESS = file
LEVEL = {{ gitea_log_level }}
STACKTRACE_LEVEL = None
[log.file]
LOG_ROTATE = false
[log.file.macaron]
LEVEL = Info
[log.file.router]
LEVEL = Info
[log.file.access]
LEVEL = Info
[cron]
ENABLED = true
RUN_AT_START = false
[cron.update_mirrors]
SCHEDULE = @every 10m
[cron.repo_health_check]
SCHEDULE = @every 24h
TIMEOUT =
ARGS =
[cron.check_repo_stats]
RUN_AT_START = true
SCHEDULE = @every 24h
[cron.archive_cleanup]
ENABLED = true
RUN_AT_START = true
SCHEDULE = @every 24h
OLDER_THAN = 24h
[cron.sync_external_users]
RUN_AT_START = true
SCHEDULE = @every 24h
UPDATE_EXISTING = true
[cron.update_migration_post_id]
SCHEDULE = @every 24h
[mirror]
DEFAULT_INTERVAL = {{ gitea_mirror_default_interval }}
MIN_INTERVAL = {{ gitea_mirror_min_interval }}
[api]
ENABLE_SWAGGER = {{ gitea_api_swagger_enabled | bool | lower }}
MAX_RESPONSE_ITEMS = 50
DEFAULT_PAGING_NUM = {{ gitea_api_default_paging_num }}
DEFAULT_GIT_TREES_PER_PAGE = {{ gitea_api_default_git_trees_per_page }}
DEFAULT_MAX_BLOB_SIZE = 10485760
{% if gitea_oauth_provider_enabled | bool %}
[oauth2]
ENABLE = true
ACCESS_TOKEN_EXPIRATION_TIME = {{ gitea_access_token_expiration_time }}
REFRESH_TOKEN_EXPIRATION_TIME = {{ gitea_refresh_token_expiration_time }}
INVALIDATE_REFRESH_TOKENS = {{ gitea_invalidate_refresh_tokens | bool | lower }}
JWT_SIGNING_ALGORITHM = {{ gitea_jwt_signing_algorithm }}
JWT_SECRET = {{ gitea_jwt_secret }}
{% else %}
[oauth2]
ENABLE = false
{% endif %}
[other]
SHOW_FOOTER_BRANDING = {{ gitea_footer_show_branding | bool | lower }}
SHOW_FOOTER_VERSION = {{ gitea_footer_show_version | bool | lower }}
SHOW_FOOTER_TEMPLATE_LOAD_TIME = {{ gitea_footer_show_template_load_time | bool | lower }}
[markup.asciidoc]
ENABLED = false
FILE_EXTENSIONS = .adoc,.asciidoc
RENDER_COMMAND = "asciidoc --out-file=- -"
IS_INPUT_FILE = false
[metrics]
ENABLED = {{ gitea_metrics_enabled | bool | lower }}
{% if gitea_metrics_token is defined and gitea_metrics_token %}
TOKEN = {{ gitea_metrics_token }}
{% endif %}