app.ini 16 KB

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