app.ini 14 KB

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