2019-05-22 02:10:57 -05:00
; this file is the configuration of your local gitea instance
; {{ ansible_managed }}
;
; This file overwrites the default values from gitea.
; undefined variables will use the default value from gitea.
; Cheat Sheet: https://docs.gitea.io/en-us/config-cheat-sheet/
;
2017-01-10 15:09:34 -06:00
; App name that shows on every page title
APP_NAME = {{ gitea_app_name }}
; Change it if you run locally
RUN_USER = {{ gitea_user }}
; Either "dev", "prod" or "test", default is "dev"
RUN_MODE = prod
[repository]
2020-05-18 16:37:17 -05:00
ROOT = {{ gitea_repository_root }}
2017-01-10 15:09:34 -06:00
; Force every new repository to be private
2019-05-22 02:10:57 -05:00
FORCE_PRIVATE = {{ gitea_force_private }}
2019-03-10 07:46:18 -05:00
; Global limit of repositories per user, applied at creation time. -1 means no limit
2019-05-22 02:10:57 -05:00
MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }}
2017-01-10 15:09:34 -06:00
; Mirror sync queue length, increase if mirror syncing starts hanging
2019-03-10 08:12:12 -05:00
MIRROR_QUEUE_LENGTH = 1000
2019-03-10 07:46:18 -05:00
; Disable the ability to interact with repositories using the HTTP protocol
2019-05-22 02:10:57 -05:00
DISABLE_HTTP_GIT = {{ gitea_disable_http_git }}
2017-01-10 15:09:34 -06:00
[ui]
2019-03-10 08:12:12 -05:00
; Whether the email of the user should be shown in the Explore Users page
2017-01-10 15:09:34 -06:00
SHOW_USER_EMAIL = {{ gitea_show_user_email }}
2020-05-15 03:56:12 -05:00
THEMES = {{ gitea_themes }}
2020-05-09 16:01:51 -05:00
DEFAULT_THEME = {{ gitea_theme_default }}
2017-01-10 15:09:34 -06:00
[server]
2019-03-10 08:12:12 -05:00
; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'.
2019-05-22 02:10:57 -05:00
PROTOCOL = {{ gitea_protocol }}
DOMAIN = {{ gitea_http_domain }}
ROOT_URL = {{ gitea_root_url }}
2019-03-10 08:12:12 -05:00
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
2019-05-22 02:10:57 -05:00
HTTP_ADDR = {{ gitea_http_listen }}
HTTP_PORT = {{ gitea_http_port }}
2020-09-18 05:41:54 -05:00
{% if gitea_http_port == 443 %}
PORT_TO_REDIRECT = 80
{% endif %}
{% if gitea_http_letsencrypt_mail is defined %}
ENABLE_LETSENCRYPT = true
LETSENCRYPT_ACCEPTTOS = true
LETSENCRYPT_EMAIL = {{ gitea_http_letsencrypt_mail }}
{% endif %}
2017-01-10 15:09:34 -06:00
; Disable SSH feature when not available
2019-03-10 08:12:12 -05:00
DISABLE_SSH = false
; Whether to use the builtin SSH server or not.
2019-05-22 02:10:57 -05:00
START_SSH_SERVER = {{ gitea_start_ssh }}
2017-01-10 15:09:34 -06:00
; Domain name to be exposed in clone URL
2019-05-22 02:10:57 -05:00
SSH_DOMAIN = {{ gitea_ssh_domain }}
2019-03-10 08:12:12 -05:00
; The network interface the builtin SSH server should listen on
2019-05-22 02:10:57 -05:00
SSH_LISTEN_HOST = {{ gitea_ssh_listen }}
2017-01-10 15:09:34 -06:00
; Port number to be exposed in clone URL
2019-05-22 02:10:57 -05:00
SSH_PORT = {{ gitea_ssh_port }}
2019-03-10 08:12:12 -05:00
; The port number the builtin SSH server should listen on
2019-05-22 02:10:57 -05:00
SSH_LISTEN_PORT = %(SSH_PORT)s
2017-01-10 15:09:34 -06:00
; Disable CDN even in "prod" mode
2019-05-22 02:10:57 -05:00
OFFLINE_MODE = {{ gitea_offline_mode }}
2017-01-10 15:09:34 -06:00
; Default path for App data
2019-05-22 02:10:57 -05:00
APP_DATA_PATH = {{ gitea_home }}/data
2019-07-05 11:46:41 -05:00
{%- if gitea_lfs_server_enabled | bool %}
;Enables git-lfs support.
LFS_START_SERVER = true
; Where to store LFS files.
LFS_CONTENT_PATH = {{ gitea_lfs_content_path }}
{%- endif %}
2017-01-10 15:09:34 -06:00
[database]
2019-03-10 08:12:12 -05:00
; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
2019-05-22 02:10:57 -05:00
DB_TYPE = {{ gitea_db_type }}
HOST = {{ gitea_db_host }}
NAME = {{ gitea_db_name }}
USER = {{ gitea_db_user }}
2019-03-10 08:12:12 -05:00
; Use PASSWD = `your password` for quoting if you use special characters in the password.
2019-05-22 02:10:57 -05:00
PASSWD = {{ gitea_db_password }}
2019-03-10 08:12:12 -05:00
; For Postgres, either "disable" (default), "require", or "verify-full"
; For MySQL, either "false" (default), "true", or "skip-verify"
2019-05-22 02:10:57 -05:00
SSL_MODE = {{ gitea_db_ssl }}
2019-03-10 08:12:12 -05:00
; For "sqlite3" and "tidb", use an absolute path when you start gitea as service
2019-05-22 02:10:57 -05:00
PATH = {{ gitea_db_path }}
2019-03-10 08:12:12 -05:00
[indexer]
; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
2019-05-22 02:10:57 -05:00
ISSUE_INDEXER_PATH = {{ gitea_home }}/indexers/issues.bleve
2019-03-10 08:12:12 -05:00
; Issue indexer queue, currently support: channel or levelqueue, default is levelqueue
ISSUE_INDEXER_QUEUE_TYPE = levelqueue
2019-03-10 08:37:47 -05:00
; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the queue will be saved path,
2019-03-10 08:12:12 -05:00
; default is indexers/issues.queue
2019-03-10 08:37:47 -05:00
ISSUE_INDEXER_QUEUE_DIR = {{ gitea_home }}/indexers/issues.queue
2019-03-10 08:12:12 -05:00
; repo indexer by default disabled, since it uses a lot of disk space
2020-06-18 00:41:59 -05:00
REPO_INDEXER_ENABLED = {{ gitea_repo_indexer_enabled }}
2019-05-22 02:10:57 -05:00
REPO_INDEXER_PATH = {{ gitea_home }}/indexers/repos.bleve
2020-06-18 00:41:59 -05:00
REPO_INDEXER_INCLUDE = {{ gitea_repo_indexer_include }}
REPO_INDEXER_EXCLUDE = {{ gitea_repo_indexer_exclude }}
REPO_INDEXER_EXCLUDE_VENDORED = {{ gitea_repo_exclude_vendored }}
MAX_FILE_SIZE = {{ gitea_repo_indexer_max_file_size }}
2017-01-10 15:09:34 -06:00
[security]
; Whether the installer is disabled
2019-03-10 08:12:12 -05:00
INSTALL_LOCK = true
2017-01-10 15:09:34 -06:00
; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
2019-05-22 02:10:57 -05:00
SECRET_KEY = {{ gitea_secret_key }}
INTERNAL_TOKEN = {{ gitea_internal_token }}
2019-03-10 08:12:12 -05:00
; How long to remember that an user is logged in before requiring relogin (in days)
LOGIN_REMEMBER_DAYS = 7
2017-01-10 15:09:34 -06:00
[service]
2019-03-10 08:12:12 -05:00
; Disallow registration, only allow admins to create accounts.
2019-05-22 02:10:57 -05:00
DISABLE_REGISTRATION = {{ gitea_disable_registration }}
2017-01-10 15:09:34 -06:00
; User must sign in to view anything.
2019-05-22 02:10:57 -05:00
REQUIRE_SIGNIN_VIEW = {{ gitea_require_signin }}
2017-01-10 15:09:34 -06:00
; Enable captcha validation for registration
2019-05-22 02:10:57 -05:00
ENABLE_CAPTCHA = {{ gitea_enable_captcha }}
2019-03-10 08:12:12 -05:00
; Type of captcha you want to use. Options: image, recaptcha
CAPTCHA_TYPE = image
; Enable recaptcha to use Google's recaptcha service
; Go to https://www.google.com/recaptcha/admin to sign up for a key
RECAPTCHA_SECRET =
RECAPTCHA_SITEKEY =
; Show Registration button
2019-03-10 08:40:33 -05:00
SHOW_REGISTRATION_BUTTON = {{ gitea_show_registration_button }}
2020-05-09 21:18:59 -05:00
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ gitea_only_allow_external_registration }}
2020-07-28 05:22:35 -05:00
ENABLE_NOTIFY_MAIL = {{ gitea_enable_notify_mail }}
2017-01-10 15:09:34 -06:00
[mailer]
2019-03-08 05:29:34 -06:00
ENABLED = {{ gitea_mailer_enabled }}
2017-01-10 15:09:34 -06:00
; Mail server
; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:465
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
2019-03-08 05:29:34 -06:00
HOST = {{ gitea_mailer_host }}
2019-03-10 08:12:12 -05:00
; Disable HELO operation when hostnames are different.
DISABLE_HELO =
; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
HELO_HOSTNAME =
2017-01-10 15:09:34 -06:00
; Do not verify the certificate of the server. Only use this for self-signed certificates
2019-03-08 05:29:34 -06:00
SKIP_VERIFY = {{ gitea_mailer_skip_verify }}
2017-01-10 15:09:34 -06:00
; Use client certificate
2019-03-10 08:12:12 -05:00
USE_CERTIFICATE = false
2017-01-10 15:09:34 -06:00
CERT_FILE = {{ gitea_home }}/custom/mailer/cert.pem
KEY_FILE = {{ gitea_home }}/custom/mailer/key.pem
2019-03-10 08:12:12 -05:00
; Should SMTP connection use TLS
2019-03-10 08:14:57 -05:00
IS_TLS_ENABLED = {{ gitea_mailer_tls_enabled }}
2017-01-10 15:09:34 -06:00
; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
2019-03-08 05:29:34 -06:00
FROM = {{ gitea_mailer_from }}
2017-01-10 15:09:34 -06:00
; Mailer user name and password
2019-06-10 14:10:39 -05:00
USER = {{ gitea_mailer_user }}
2019-03-10 08:12:12 -05:00
; Use PASSWD = `your password` for quoting if you use special characters in the password.
2019-06-10 14:10:39 -05:00
PASSWD = `{{ gitea_mailer_password }}`
2019-03-10 08:12:12 -05:00
; Send mails as plain text
SEND_AS_PLAIN_TEXT = false
; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
2020-07-21 07:18:08 -05:00
MAILER_TYPE = {{ gitea_mailer_type }}
2019-03-10 08:12:12 -05:00
; Specify an alternative sendmail binary
SENDMAIL_PATH = sendmail
; Specify any extra sendmail arguments
SENDMAIL_ARGS =
2017-01-10 15:09:34 -06:00
[session]
; Either "memory", "file", or "redis", default is "memory"
2019-03-10 08:12:12 -05:00
PROVIDER = file
2017-01-10 15:09:34 -06:00
; Provider config options
2019-03-10 08:12:12 -05:00
; memory: doesn't have any config yet
2017-01-10 15:09:34 -06:00
; file: session file path, e.g. `data/sessions`
; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
2019-05-22 02:10:57 -05:00
PROVIDER_CONFIG = {{ gitea_home }}/data/sessions
2017-01-10 15:09:34 -06:00
[picture]
AVATAR_UPLOAD_PATH = {{ gitea_home }}/data/avatars
2019-03-10 08:12:12 -05:00
; This value will always be true in offline mode.
2017-01-10 15:09:34 -06:00
DISABLE_GRAVATAR = {{ gitea_disable_gravatar }}
[attachment]
; Whether attachments are enabled. Defaults to `true`
2019-03-10 08:12:12 -05:00
ENABLED = true
2017-01-10 15:09:34 -06:00
; Path for attachments. Defaults to `data/attachments`
2019-05-22 02:10:57 -05:00
PATH = {{ gitea_home }}/data/attachments
2017-01-10 15:09:34 -06:00
[log]
2019-05-22 02:10:57 -05:00
ROOT_PATH = {{ gitea_home }}/log
2017-01-10 15:09:34 -06:00
; Either "console", "file", "conn", "smtp" or "database", default is "console"
; Use comma to separate multiple modes, e.g. "console, file"
MODE = file
2019-03-10 08:12:12 -05:00
; Buffer length of the channel, keep it as it is if you don't know what it is.
2017-01-10 15:09:34 -06:00
BUFFER_LEN = 10000
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
LEVEL = Info
2019-03-10 08:12:12 -05:00
REDIRECT_MACARON_LOG = false
2017-01-10 15:09:34 -06:00
2019-12-21 07:18:58 -06:00
[oauth2]
ENABLE = {{ gitea_oauth2_enabled }}
JWT_SECRET = {{ gitea_oauth2_jwt_secret }}
2019-12-21 06:08:19 -06:00
[metrics]
ENABLED = {{ gitea_metrics_enabled }}
TOKEN = {{ gitea_metrics_token }}