aboutsummaryrefslogtreecommitdiff
path: root/conf/app.ini
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-29 16:29:17 +0800
committerGitHub <noreply@github.com>2020-02-29 16:29:17 +0800
commit17ae0ed3eef54d96bd179ff7fec0540cf3024748 (patch)
treea9111282717da16feb83baf352ffb2ee5178ca0d /conf/app.ini
parentd59b0f6ff7ee24d94eaa5ad68173405faea6a81c (diff)
conf: overhaul settings (#5953)
* Overhaul cache settings * Overhaul HTTP settings * conf: overhaul more settings * log: make LGTM happy * travis: upload report to Codecov * Add codecov.yml
Diffstat (limited to 'conf/app.ini')
-rw-r--r--conf/app.ini116
1 files changed, 56 insertions, 60 deletions
diff --git a/conf/app.ini b/conf/app.ini
index 49f15402..5c25b1a4 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -244,19 +244,63 @@ MAX_LIFE_TIME = 86400
; The cookie name for CSRF token.
CSRF_COOKIE_NAME = _csrf
-; Attachment settings for releases
-[release.attachment]
-; Whether attachments are enabled. Defaults to `true`
+[cache]
+; The cache adapter, either "memory", "redis", or "memcache".
+ADAPTER = memory
+; For "memory" only, GC interval in seconds.
+INTERVAL = 60
+; For "redis" and "memcache", connection host address:
+; - redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
+; - memcache: `127.0.0.1:11211`
+HOST =
+
+[http]
+; The value for "Access-Control-Allow-Origin" header, default is not to present.
+ACCESS_CONTROL_ALLOW_ORIGIN =
+
+[attachment]
+; Whether to enabled upload attachments in general.
ENABLED = true
-; Path for attachments. Defaults to `data/attachments`
+; The path to store attachments on the file system.
PATH = data/attachments
-; One or more allowed types, e.g. image/jpeg|image/png
+; File types that are allowed to be uploaded, e.g. "image/jpeg|image/png". Leave empty to allow any file type.
+ALLOWED_TYPES = image/jpeg|image/png
+; The maximum size of each file in MB.
+MAX_SIZE = 4
+; The maximum number of files per upload.
+MAX_FILES = 5
+
+[release.attachment]
+; Whether to enabled upload attachments for releases.
+ENABLED = true
+; File types that are allowed to be uploaded, e.g. "image/jpeg|image/png". Leave empty to allow any file type.
ALLOWED_TYPES = */*
-; Max size of each file. Defaults to 32MB
+; The maximum size of each file in MB.
MAX_SIZE = 32
-; Max number of files per upload. Defaults to 10
+; The maximum number of files per upload.
MAX_FILES = 10
+[time]
+; Specifies the format for fully outputed dates.
+; Values should be one of the following:
+; ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano.
+; For more information about the format see http://golang.org/pkg/time/#pkg-constants.
+FORMAT = RFC1123
+
+[picture]
+; The path to store user avatars on the file system.
+AVATAR_UPLOAD_PATH = data/avatars
+; The path to store repository avatars on the file system.
+REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
+; Chinese users can use a custom avatar source, such as http://cn.gravatar.com/avatar/.
+GRAVATAR_SOURCE = gravatar
+; Whether to disable Gravatar, this value will be forced to be true in offline mode.
+DISABLE_GRAVATAR = false
+; Whether to enable federated avatar lookup uses DNS to discover avatar associated
+; with emails, see https://www.libravatar.org for details.
+; This value will be forced to be false in offline mode or when Gravatar is disbaled.
+ENABLE_FEDERATED_AVATAR = false
+
[markdown]
; Enable hard line break extension
ENABLE_HARD_LINE_BREAK = false
@@ -274,10 +318,6 @@ DASHES = true
LATEX_DASHES = true
ANGLED_QUOTES = true
-[http]
-; Value for Access-Control-Allow-Origin header, default is not to present
-ACCESS_CONTROL_ALLOW_ORIGIN =
-
[admin]
; Disable regular (non-admin) users to create organizations
DISABLE_REGULAR_ORG_CREATION = false
@@ -294,50 +334,6 @@ SKIP_TLS_VERIFY = false
; Number of history information in each page
PAGING_NUM = 10
-[cache]
-; Either "memory", "redis", or "memcache", default is "memory"
-ADAPTER = memory
-; For "memory" only, GC interval in seconds, default is 60
-INTERVAL = 60
-; For "redis" and "memcache", connection host address
-; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
-; memcache: `127.0.0.1:11211`
-HOST =
-
-[picture]
-; Path to store user uploaded avatars
-AVATAR_UPLOAD_PATH = data/avatars
-; Path to store repository uploaded avatars
-REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
-; Chinese users can choose "duoshuo"
-; or a custom avatar source, like: http://cn.gravatar.com/avatar/
-GRAVATAR_SOURCE = gravatar
-; This value will be forced to be true in offline mode.
-DISABLE_GRAVATAR = false
-; Federated avatar lookup uses DNS to discover avatar associated
-; with emails, see https://www.libravatar.org
-; This value will be forced to be false in offline mode or Gravatar is disbaled.
-ENABLE_FEDERATED_AVATAR = false
-
-; Attachment settings for issues
-[attachment]
-; Whether attachments are enabled. Defaults to `true`
-ENABLED = true
-; Path for attachments. Defaults to `data/attachments`
-PATH = data/attachments
-; One or more allowed types, e.g. image/jpeg|image/png
-ALLOWED_TYPES = image/jpeg|image/png
-; Max size of each file. Defaults to 4MB
-MAX_SIZE = 4
-; Max number of files per upload. Defaults to 5
-MAX_FILES = 5
-
-[time]
-; Specifies the format for fully outputed dates. Defaults to RFC1123
-; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
-; For more information about the format see http://golang.org/pkg/time/#pkg-constants
-FORMAT =
-
; General settings of loggers
[log]
ROOT_PATH =
@@ -446,7 +442,7 @@ PULL = 300
GC = 60
[mirror]
-; Default interval in hours between each check
+; The default interval in hours for fetching updates.
DEFAULT_INTERVAL = 8
[api]
@@ -491,6 +487,10 @@ ENABLE_BASIC_AUTH = false
BASIC_AUTH_USERNAME =
BASIC_AUTH_PASSWORD =
+; Extension mapping to highlight class
+; e.g. .toml=ini
+[highlight.mapping]
+
[i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,gl-ES,uk-UA,en-GB,hu-HU,sk-SK,id-ID,fa-IR,vi-VN,pt-PT
NAMES = English,简体中文,繁體中文(香港),繁體中文(臺灣),Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,galego,українська,English (United Kingdom),Magyar,Slovenčina,Indonesian,Persian,Vietnamese,Português
@@ -528,10 +528,6 @@ fa-IR = fa
vi-VN = vi
pt-PT = pt
-; Extension mapping to highlight class
-; e.g. .toml=ini
-[highlight.mapping]
-
[other]
SHOW_FOOTER_BRANDING = false
; Show time of template execution in the footer