app.ini 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. # NEVER EVER MODIFY THIS FILE
  2. # PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE
  3. ; App name that shows on every page title
  4. APP_NAME = Gogs: Go Git Service
  5. ; Change it if you run locally
  6. RUN_USER = git
  7. ; Either "dev", "prod" or "test", default is "dev"
  8. RUN_MODE = dev
  9. [repository]
  10. ROOT =
  11. SCRIPT_TYPE = bash
  12. ; Default ANSI charset
  13. ANSI_CHARSET =
  14. ; Force every new repository to be private
  15. FORCE_PRIVATE = false
  16. ; Global maximum creation limit of repository per user, -1 means no limit
  17. MAX_CREATION_LIMIT = -1
  18. ; Mirror sync queue length, increase if mirror syncing starts hanging
  19. MIRROR_QUEUE_LENGTH = 1000
  20. ; Patch test queue length, increase if pull request patch testing starts hanging
  21. PULL_REQUEST_QUEUE_LENGTH = 1000
  22. ; Preferred Licenses to place at the top of the List
  23. ; Name must match file name in conf/license or custom/conf/license
  24. PREFERRED_LICENSES = Apache License 2.0,MIT License
  25. ; Disable ability to interact with repositories by HTTP protocol
  26. DISABLE_HTTP_GIT = false
  27. ; Enable ability to migrate repository by local path
  28. ENABLE_LOCAL_PATH_MIGRATION = false
  29. [repository.editor]
  30. ; List of file extensions that should have line wraps in the CodeMirror editor
  31. ; Separate extensions with a comma. To line wrap files w/o extension, just put a comma
  32. LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
  33. ; Valid file modes that have a preview API associated with them, such as api/v1/markdown
  34. ; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
  35. PREVIEWABLE_FILE_MODES = markdown
  36. [repository.upload]
  37. ; Whether repository file uploads are enabled. Defaults to `true`
  38. ENABLED = true
  39. ; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gogs restart)
  40. TEMP_PATH = data/tmp/uploads
  41. ; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
  42. ALLOWED_TYPES =
  43. ; Max size of each file in MB. Defaults to 3MB
  44. FILE_MAX_SIZE = 3
  45. ; Max number of files per upload. Defaults to 5
  46. MAX_FILES = 5
  47. [ui]
  48. ; Number of repositories that are showed in one explore page
  49. EXPLORE_PAGING_NUM = 20
  50. ; Number of issues that are showed in one page
  51. ISSUE_PAGING_NUM = 10
  52. ; Number of maximum commits showed in one activity feed
  53. FEED_MAX_COMMIT_NUM = 5
  54. ; Value of `theme-color` meta tag, used by Android >= 5.0
  55. ; An invalid color like "none" or "disable" will have the default style
  56. ; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
  57. THEME_COLOR_META_TAG = `#ff5343`
  58. ; Max size of files to be displayed (defaults is 8MiB)
  59. MAX_DISPLAY_FILE_SIZE = 8388608
  60. [ui.admin]
  61. ; Number of users that are showed in one page
  62. USER_PAGING_NUM = 50
  63. ; Number of repos that are showed in one page
  64. REPO_PAGING_NUM = 50
  65. ; Number of notices that are showed in one page
  66. NOTICE_PAGING_NUM = 25
  67. ; Number of organization that are showed in one page
  68. ORG_PAGING_NUM = 50
  69. [ui.user]
  70. ; Number of repos that are showed in one page
  71. REPO_PAGING_NUM = 15
  72. [markdown]
  73. ; Enable hard line break extension
  74. ENABLE_HARD_LINE_BREAK = false
  75. ; List of custom URL-Schemes that are allowed as links when rendering Markdown
  76. ; for example git,magnet
  77. CUSTOM_URL_SCHEMES =
  78. ; List of file extensions that should be rendered/edited as Markdown
  79. ; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
  80. FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
  81. [server]
  82. PROTOCOL = http
  83. DOMAIN = localhost
  84. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  85. HTTP_ADDR = 0.0.0.0
  86. HTTP_PORT = 3000
  87. ; Permission for unix socket
  88. UNIX_SOCKET_PERMISSION = 666
  89. ; Local (DMZ) URL for Gogs workers (such as SSH update) accessing web service.
  90. ; In most cases you do not need to change the default value.
  91. ; Alter it only if your SSH server node is not the same as HTTP node.
  92. LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  93. ; Disable SSH feature when not available
  94. DISABLE_SSH = false
  95. ; Whether use builtin SSH server or not.
  96. START_SSH_SERVER = false
  97. ; Domain name to be exposed in clone URL
  98. SSH_DOMAIN = %(DOMAIN)s
  99. ; Network interface builtin SSH server listens on
  100. SSH_LISTEN_HOST = 0.0.0.0
  101. ; Port number to be exposed in clone URL
  102. SSH_PORT = 22
  103. ; Port number builtin SSH server listens on
  104. SSH_LISTEN_PORT = %(SSH_PORT)s
  105. ; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  106. SSH_ROOT_PATH =
  107. ; Directory to create temporary files when test publick key using ssh-keygen,
  108. ; default is system temporary directory.
  109. SSH_KEY_TEST_PATH =
  110. ; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
  111. SSH_KEYGEN_PATH = ssh-keygen
  112. ; Indicate whether to check minimum key size with corresponding type
  113. MINIMUM_KEY_SIZE_CHECK = false
  114. ; Disable CDN even in "prod" mode
  115. OFFLINE_MODE = false
  116. DISABLE_ROUTER_LOG = false
  117. ; Generate steps:
  118. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  119. ;
  120. ; Or from a .pfx file exported from the Windows certificate store (do
  121. ; not forget to export the private key):
  122. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  123. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  124. CERT_FILE = custom/https/cert.pem
  125. KEY_FILE = custom/https/key.pem
  126. ; Upper level of template and static file path
  127. ; default is the path where Gogs is executed
  128. STATIC_ROOT_PATH =
  129. ; Default path for App data
  130. APP_DATA_PATH = data
  131. ; Application level GZIP support
  132. ENABLE_GZIP = false
  133. ; Landing page for non-logged users, can be "home" or "explore"
  134. LANDING_PAGE = home
  135. ; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  136. [ssh.minimum_key_sizes]
  137. ED25519 = 256
  138. ECDSA = 256
  139. RSA = 2048
  140. DSA = 1024
  141. [database]
  142. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  143. DB_TYPE = mysql
  144. HOST = 127.0.0.1:3306
  145. NAME = gogs
  146. USER = root
  147. PASSWD =
  148. ; For "postgres" only, either "disable", "require" or "verify-full"
  149. SSL_MODE = disable
  150. ; For "sqlite3" and "tidb", use absolute path when you start as service
  151. PATH = data/gogs.db
  152. [admin]
  153. [security]
  154. INSTALL_LOCK = false
  155. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  156. SECRET_KEY = !#@FDEWREWR&*(
  157. ; Auto-login remember days
  158. LOGIN_REMEMBER_DAYS = 7
  159. COOKIE_USERNAME = gogs_awesome
  160. COOKIE_REMEMBER_NAME = gogs_incredible
  161. ; Reverse proxy authentication header name of user name
  162. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  163. [service]
  164. ACTIVE_CODE_LIVE_MINUTES = 180
  165. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  166. ; User need to confirm e-mail for registration
  167. REGISTER_EMAIL_CONFIRM = false
  168. ; Does not allow register and admin create account only
  169. DISABLE_REGISTRATION = false
  170. ; User must sign in to view anything.
  171. REQUIRE_SIGNIN_VIEW = false
  172. ; Mail notification
  173. ENABLE_NOTIFY_MAIL = false
  174. ; More detail: https://github.com/gogits/gogs/issues/165
  175. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  176. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  177. ; Enable captcha validation for registration
  178. ENABLE_CAPTCHA = true
  179. [webhook]
  180. ; Hook task queue length, increase if webhook shooting starts hanging
  181. QUEUE_LENGTH = 1000
  182. ; Deliver timeout in seconds
  183. DELIVER_TIMEOUT = 5
  184. ; Allow insecure certification
  185. SKIP_TLS_VERIFY = false
  186. ; Number of history information in each page
  187. PAGING_NUM = 10
  188. [mailer]
  189. ENABLED = false
  190. ; Buffer length of channel, keep it as it is if you don't know what it is.
  191. SEND_BUFFER_LEN = 100
  192. ; Name displayed in mail title
  193. SUBJECT = %(APP_NAME)s
  194. ; Mail server
  195. ; Gmail: smtp.gmail.com:587
  196. ; QQ: smtp.qq.com:465
  197. ; 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.
  198. HOST =
  199. ; Disable HELO operation when hostname are different.
  200. DISABLE_HELO =
  201. ; Custom hostname for HELO operation, default is from system.
  202. HELO_HOSTNAME =
  203. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  204. SKIP_VERIFY =
  205. ; Use client certificate
  206. USE_CERTIFICATE = false
  207. CERT_FILE = custom/mailer/cert.pem
  208. KEY_FILE = custom/mailer/key.pem
  209. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  210. FROM =
  211. ; Mailer user name and password
  212. USER =
  213. PASSWD =
  214. ; Use text/html as alternative format of content
  215. ENABLE_HTML_ALTERNATIVE = false
  216. [cache]
  217. ; Either "memory", "redis", or "memcache", default is "memory"
  218. ADAPTER = memory
  219. ; For "memory" only, GC interval in seconds, default is 60
  220. INTERVAL = 60
  221. ; For "redis" and "memcache", connection host address
  222. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  223. ; memcache: `127.0.0.1:11211`
  224. HOST =
  225. [session]
  226. ; Either "memory", "file", or "redis", default is "memory"
  227. PROVIDER = memory
  228. ; Provider config options
  229. ; memory: not have any config yet
  230. ; file: session file path, e.g. `data/sessions`
  231. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  232. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  233. PROVIDER_CONFIG = data/sessions
  234. ; Session cookie name
  235. COOKIE_NAME = i_like_gogits
  236. ; If you use session in https only, default is false
  237. COOKIE_SECURE = false
  238. ; Enable set cookie, default is true
  239. ENABLE_SET_COOKIE = true
  240. ; Session GC time interval, default is 86400
  241. GC_INTERVAL_TIME = 86400
  242. ; Session life time, default is 86400
  243. SESSION_LIFE_TIME = 86400
  244. [picture]
  245. AVATAR_UPLOAD_PATH = data/avatars
  246. ; Chinese users can choose "duoshuo"
  247. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  248. GRAVATAR_SOURCE = gravatar
  249. ; This value will be forced to be true in offline mode.
  250. DISABLE_GRAVATAR = false
  251. ; Federated avatar lookup uses DNS to discover avatar associated
  252. ; with emails, see https://www.libravatar.org
  253. ; This value will be forced to be false in offline mode or Gravatar is disbaled.
  254. ENABLE_FEDERATED_AVATAR = true
  255. [attachment]
  256. ; Whether attachments are enabled. Defaults to `true`
  257. ENABLE = true
  258. ; Path for attachments. Defaults to `data/attachments`
  259. PATH = data/attachments
  260. ; One or more allowed types, e.g. image/jpeg|image/png
  261. ALLOWED_TYPES = image/jpeg|image/png
  262. ; Max size of each file. Defaults to 32MB
  263. MAX_SIZE = 4
  264. ; Max number of files per upload. Defaults to 10
  265. MAX_FILES = 5
  266. [time]
  267. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  268. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  269. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  270. FORMAT =
  271. [log]
  272. ROOT_PATH =
  273. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  274. ; Use comma to separate multiple modes, e.g. "console, file"
  275. MODE = console
  276. ; Buffer length of channel, keep it as it is if you don't know what it is.
  277. BUFFER_LEN = 10000
  278. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  279. LEVEL = Trace
  280. ; For "console" mode only
  281. [log.console]
  282. LEVEL =
  283. ; For "file" mode only
  284. [log.file]
  285. LEVEL =
  286. ; This enables automated log rotate(switch of following options), default is true
  287. LOG_ROTATE = true
  288. ; Max line number of single file, default is 1000000
  289. MAX_LINES = 1000000
  290. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  291. MAX_SIZE_SHIFT = 28
  292. ; Segment log daily, default is true
  293. DAILY_ROTATE = true
  294. ; Expired days of log file(delete after max days), default is 7
  295. MAX_DAYS = 7
  296. ; For "conn" mode only
  297. [log.conn]
  298. LEVEL =
  299. ; Reconnect host for every single message, default is false
  300. RECONNECT_ON_MSG = false
  301. ; Try to reconnect when connection is lost, default is false
  302. RECONNECT = false
  303. ; Either "tcp", "unix" or "udp", default is "tcp"
  304. PROTOCOL = tcp
  305. ; Host address
  306. ADDR =
  307. ; For "smtp" mode only
  308. [log.smtp]
  309. LEVEL =
  310. ; Name displayed in mail title, default is "Diagnostic message from server"
  311. SUBJECT = Diagnostic message from server
  312. ; Mail server
  313. HOST =
  314. ; Mailer user name and password
  315. USER =
  316. PASSWD =
  317. ; Receivers, can be one or more, e.g. 1@example.com,2@example.com
  318. RECEIVERS =
  319. ; For "database" mode only
  320. [log.database]
  321. LEVEL =
  322. ; Either "mysql" or "postgres"
  323. DRIVER =
  324. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  325. CONN =
  326. [cron]
  327. ; Enable running cron tasks periodically.
  328. ENABLED = true
  329. ; Run cron tasks when Gogs starts.
  330. RUN_AT_START = false
  331. ; Update mirrors
  332. [cron.update_mirrors]
  333. SCHEDULE = @every 10m
  334. ; Repository health check
  335. [cron.repo_health_check]
  336. SCHEDULE = @every 24h
  337. TIMEOUT = 60s
  338. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  339. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  340. ARGS =
  341. ; Check repository statistics
  342. [cron.check_repo_stats]
  343. RUN_AT_START = true
  344. SCHEDULE = @every 24h
  345. [git]
  346. ; Disables highlight of added and removed changes
  347. DISABLE_DIFF_HIGHLIGHT = false
  348. ; Max number of lines allowed of a single file in diff view
  349. MAX_GIT_DIFF_LINES = 1000
  350. ; Max number of characters of a line allowed in diff view
  351. MAX_GIT_DIFF_LINE_CHARACTERS = 500
  352. ; Max number of files shown in diff view
  353. MAX_GIT_DIFF_FILES = 100
  354. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  355. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  356. GC_ARGS =
  357. ; Operation timeout in seconds
  358. [git.timeout]
  359. MIGRATE = 600
  360. MIRROR = 300
  361. CLONE = 300
  362. PULL = 300
  363. GC = 60
  364. [mirror]
  365. ; Default interval in hours between each check
  366. DEFAULT_INTERVAL = 8
  367. [api]
  368. ; Max number of items will response in a page
  369. MAX_RESPONSE_ITEMS = 50
  370. [i18n]
  371. 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
  372. NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어,Galego
  373. ; Used for datetimepicker
  374. [i18n.datelang]
  375. en-US = en
  376. zh-CN = zh
  377. zh-HK = zh-TW
  378. zh-TW = zh-TW
  379. de-DE = de
  380. fr-FR = fr
  381. nl-NL = nl
  382. lv-LV = lv
  383. ru-RU = ru
  384. ja-JP = ja
  385. es-ES = es
  386. pt-BR = pt-BR
  387. pl-PL = pl
  388. bg-BG = bg
  389. it-IT = it
  390. fi-FI = fi
  391. tr-TR = tr
  392. cs-CZ = cs-CZ
  393. sr-SP = sr
  394. sv-SE = sv
  395. ko-KR = ko
  396. gl-ES = gl
  397. ; Extension mapping to highlight class
  398. ; e.g. .toml=ini
  399. [highlight.mapping]
  400. [other]
  401. SHOW_FOOTER_BRANDING = false
  402. ; Show version information about Gogs and Go in the footer
  403. SHOW_FOOTER_VERSION = true
  404. ; Show time of template execution in the footer
  405. SHOW_FOOTER_TEMPLATE_LOAD_TIME = true