app.ini 14 KB

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