app.ini 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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. [http]
  136. ; Value for Access-Control-Allow-Origin header, default is not to present
  137. ACCESS_CONTROL_ALLOW_ORIGIN =
  138. ; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  139. [ssh.minimum_key_sizes]
  140. ED25519 = 256
  141. ECDSA = 256
  142. RSA = 2048
  143. DSA = 1024
  144. [database]
  145. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  146. DB_TYPE = mysql
  147. HOST = 127.0.0.1:3306
  148. NAME = gogs
  149. USER = root
  150. PASSWD =
  151. ; For "postgres" only, either "disable", "require" or "verify-full"
  152. SSL_MODE = disable
  153. ; For "sqlite3" and "tidb", use absolute path when you start as service
  154. PATH = data/gogs.db
  155. [admin]
  156. [security]
  157. INSTALL_LOCK = false
  158. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  159. SECRET_KEY = !#@FDEWREWR&*(
  160. ; Auto-login remember days
  161. LOGIN_REMEMBER_DAYS = 7
  162. COOKIE_USERNAME = gogs_awesome
  163. COOKIE_REMEMBER_NAME = gogs_incredible
  164. ; Reverse proxy authentication header name of user name
  165. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  166. [service]
  167. ACTIVE_CODE_LIVE_MINUTES = 180
  168. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  169. ; User need to confirm e-mail for registration
  170. REGISTER_EMAIL_CONFIRM = false
  171. ; Does not allow register and admin create account only
  172. DISABLE_REGISTRATION = false
  173. ; User must sign in to view anything.
  174. REQUIRE_SIGNIN_VIEW = false
  175. ; Mail notification
  176. ENABLE_NOTIFY_MAIL = false
  177. ; More detail: https://github.com/gogits/gogs/issues/165
  178. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  179. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  180. ; Enable captcha validation for registration
  181. ENABLE_CAPTCHA = true
  182. [webhook]
  183. ; Hook task queue length, increase if webhook shooting starts hanging
  184. QUEUE_LENGTH = 1000
  185. ; Deliver timeout in seconds
  186. DELIVER_TIMEOUT = 5
  187. ; Allow insecure certification
  188. SKIP_TLS_VERIFY = false
  189. ; Number of history information in each page
  190. PAGING_NUM = 10
  191. [mailer]
  192. ENABLED = false
  193. ; Buffer length of channel, keep it as it is if you don't know what it is.
  194. SEND_BUFFER_LEN = 100
  195. ; Name displayed in mail title
  196. SUBJECT = %(APP_NAME)s
  197. ; Mail server
  198. ; Gmail: smtp.gmail.com:587
  199. ; QQ: smtp.qq.com:465
  200. ; 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.
  201. HOST =
  202. ; Disable HELO operation when hostname are different.
  203. DISABLE_HELO =
  204. ; Custom hostname for HELO operation, default is from system.
  205. HELO_HOSTNAME =
  206. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  207. SKIP_VERIFY =
  208. ; Use client certificate
  209. USE_CERTIFICATE = false
  210. CERT_FILE = custom/mailer/cert.pem
  211. KEY_FILE = custom/mailer/key.pem
  212. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  213. FROM =
  214. ; Mailer user name and password
  215. USER =
  216. PASSWD =
  217. ; Use text/html as alternative format of content
  218. ENABLE_HTML_ALTERNATIVE = false
  219. [cache]
  220. ; Either "memory", "redis", or "memcache", default is "memory"
  221. ADAPTER = memory
  222. ; For "memory" only, GC interval in seconds, default is 60
  223. INTERVAL = 60
  224. ; For "redis" and "memcache", connection host address
  225. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  226. ; memcache: `127.0.0.1:11211`
  227. HOST =
  228. [session]
  229. ; Either "memory", "file", or "redis", default is "memory"
  230. PROVIDER = memory
  231. ; Provider config options
  232. ; memory: not have any config yet
  233. ; file: session file path, e.g. `data/sessions`
  234. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  235. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  236. PROVIDER_CONFIG = data/sessions
  237. ; Session cookie name
  238. COOKIE_NAME = i_like_gogits
  239. ; If you use session in https only, default is false
  240. COOKIE_SECURE = false
  241. ; Enable set cookie, default is true
  242. ENABLE_SET_COOKIE = true
  243. ; Session GC time interval, default is 86400
  244. GC_INTERVAL_TIME = 86400
  245. ; Session life time, default is 86400
  246. SESSION_LIFE_TIME = 86400
  247. [picture]
  248. AVATAR_UPLOAD_PATH = data/avatars
  249. ; Chinese users can choose "duoshuo"
  250. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  251. GRAVATAR_SOURCE = gravatar
  252. ; This value will be forced to be true in offline mode.
  253. DISABLE_GRAVATAR = false
  254. ; Federated avatar lookup uses DNS to discover avatar associated
  255. ; with emails, see https://www.libravatar.org
  256. ; This value will be forced to be false in offline mode or Gravatar is disbaled.
  257. ENABLE_FEDERATED_AVATAR = true
  258. [attachment]
  259. ; Whether attachments are enabled. Defaults to `true`
  260. ENABLE = true
  261. ; Path for attachments. Defaults to `data/attachments`
  262. PATH = data/attachments
  263. ; One or more allowed types, e.g. image/jpeg|image/png
  264. ALLOWED_TYPES = image/jpeg|image/png
  265. ; Max size of each file. Defaults to 32MB
  266. MAX_SIZE = 4
  267. ; Max number of files per upload. Defaults to 10
  268. MAX_FILES = 5
  269. [time]
  270. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  271. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  272. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  273. FORMAT =
  274. [log]
  275. ROOT_PATH =
  276. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  277. ; Use comma to separate multiple modes, e.g. "console, file"
  278. MODE = console
  279. ; Buffer length of channel, keep it as it is if you don't know what it is.
  280. BUFFER_LEN = 10000
  281. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  282. LEVEL = Trace
  283. ; For "console" mode only
  284. [log.console]
  285. LEVEL =
  286. ; For "file" mode only
  287. [log.file]
  288. LEVEL =
  289. ; This enables automated log rotate(switch of following options), default is true
  290. LOG_ROTATE = true
  291. ; Max line number of single file, default is 1000000
  292. MAX_LINES = 1000000
  293. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  294. MAX_SIZE_SHIFT = 28
  295. ; Segment log daily, default is true
  296. DAILY_ROTATE = true
  297. ; Expired days of log file(delete after max days), default is 7
  298. MAX_DAYS = 7
  299. ; For "conn" mode only
  300. [log.conn]
  301. LEVEL =
  302. ; Reconnect host for every single message, default is false
  303. RECONNECT_ON_MSG = false
  304. ; Try to reconnect when connection is lost, default is false
  305. RECONNECT = false
  306. ; Either "tcp", "unix" or "udp", default is "tcp"
  307. PROTOCOL = tcp
  308. ; Host address
  309. ADDR =
  310. ; For "smtp" mode only
  311. [log.smtp]
  312. LEVEL =
  313. ; Name displayed in mail title, default is "Diagnostic message from server"
  314. SUBJECT = Diagnostic message from server
  315. ; Mail server
  316. HOST =
  317. ; Mailer user name and password
  318. USER =
  319. PASSWD =
  320. ; Receivers, can be one or more, e.g. 1@example.com,2@example.com
  321. RECEIVERS =
  322. ; For "database" mode only
  323. [log.database]
  324. LEVEL =
  325. ; Either "mysql" or "postgres"
  326. DRIVER =
  327. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  328. CONN =
  329. [cron]
  330. ; Enable running cron tasks periodically.
  331. ENABLED = true
  332. ; Run cron tasks when Gogs starts.
  333. RUN_AT_START = false
  334. ; Update mirrors
  335. [cron.update_mirrors]
  336. SCHEDULE = @every 10m
  337. ; Repository health check
  338. [cron.repo_health_check]
  339. SCHEDULE = @every 24h
  340. TIMEOUT = 60s
  341. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  342. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  343. ARGS =
  344. ; Check repository statistics
  345. [cron.check_repo_stats]
  346. RUN_AT_START = true
  347. SCHEDULE = @every 24h
  348. [git]
  349. ; Disables highlight of added and removed changes
  350. DISABLE_DIFF_HIGHLIGHT = false
  351. ; Max number of lines allowed of a single file in diff view
  352. MAX_GIT_DIFF_LINES = 1000
  353. ; Max number of characters of a line allowed in diff view
  354. MAX_GIT_DIFF_LINE_CHARACTERS = 500
  355. ; Max number of files shown in diff view
  356. MAX_GIT_DIFF_FILES = 100
  357. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  358. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  359. GC_ARGS =
  360. ; Operation timeout in seconds
  361. [git.timeout]
  362. MIGRATE = 600
  363. MIRROR = 300
  364. CLONE = 300
  365. PULL = 300
  366. GC = 60
  367. [mirror]
  368. ; Default interval in hours between each check
  369. DEFAULT_INTERVAL = 8
  370. [api]
  371. ; Max number of items will response in a page
  372. MAX_RESPONSE_ITEMS = 50
  373. [i18n]
  374. 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
  375. NAMES = English,简体中文,繁體中文(香港),繁體中文(台湾),Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano,Suomalainen,Türkçe,čeština,Српски,Svenska,한국어,Galego
  376. ; Used for datetimepicker
  377. [i18n.datelang]
  378. en-US = en
  379. zh-CN = zh
  380. zh-HK = zh-TW
  381. zh-TW = zh-TW
  382. de-DE = de
  383. fr-FR = fr
  384. nl-NL = nl
  385. lv-LV = lv
  386. ru-RU = ru
  387. ja-JP = ja
  388. es-ES = es
  389. pt-BR = pt-BR
  390. pl-PL = pl
  391. bg-BG = bg
  392. it-IT = it
  393. fi-FI = fi
  394. tr-TR = tr
  395. cs-CZ = cs-CZ
  396. sr-SP = sr
  397. sv-SE = sv
  398. ko-KR = ko
  399. gl-ES = gl
  400. ; Extension mapping to highlight class
  401. ; e.g. .toml=ini
  402. [highlight.mapping]
  403. [other]
  404. SHOW_FOOTER_BRANDING = false
  405. ; Show version information about Gogs and Go in the footer
  406. SHOW_FOOTER_VERSION = true
  407. ; Show time of template execution in the footer
  408. SHOW_FOOTER_TEMPLATE_LOAD_TIME = true