app.ini 12 KB

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