You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.ini 13KB

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