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

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