app.ini 14 KB

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