app.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. [ui.admin]
  32. ; Number of users that are showed in one page
  33. USER_PAGING_NUM = 50
  34. ; Number of repos that are showed in one page
  35. REPO_PAGING_NUM = 50
  36. ; Number of notices that are showed in one page
  37. NOTICE_PAGING_NUM = 25
  38. ; Number of organization that are showed in one page
  39. ORG_PAGING_NUM = 50
  40. [markdown]
  41. ; Enable hard line break extension
  42. ENABLE_HARD_LINE_BREAK = false
  43. ; List of custom URL-Schemes that are allowed as links when rendering Markdown
  44. ; for example git,magnet
  45. CUSTOM_URL_SCHEMES =
  46. [server]
  47. PROTOCOL = http
  48. DOMAIN = localhost
  49. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  50. HTTP_ADDR =
  51. HTTP_PORT = 3000
  52. ; Local (DMZ) URL for Gogs workers (such as SSH update) accessing web service.
  53. ; In most cases you do not need to change the default value.
  54. ; Alter it only if your SSH server node is not the same as HTTP node.
  55. LOCAL_ROOT_URL = http://localhost:%(HTTP_PORT)s/
  56. ; Disable SSH feature when not available
  57. DISABLE_SSH = false
  58. ; Whether use builtin SSH server or not.
  59. START_SSH_SERVER = false
  60. SSH_PORT = 22
  61. ; Root path of SSH directory
  62. SSH_ROOT_PATH =
  63. ; override engine choice to check public keys (default: 'ssh-keygen' when
  64. ; DISABLE_SSH is set to false else 'native')
  65. SSH_PUBLICKEY_CHECK =
  66. ; directory to create temporary files when using ssh-keygen (default: /tmp)
  67. SSH_WORK_PATH =
  68. ; path to ssh-keygen (default: result of `which ssh-keygen`)
  69. SSH_KEYGEN_PATH =
  70. ; Disable CDN even in "prod" mode
  71. OFFLINE_MODE = false
  72. DISABLE_ROUTER_LOG = false
  73. ; Generate steps:
  74. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  75. ;
  76. ; Or from a .pfx file exported from the Windows certificate store (do
  77. ; not forget to export the private key):
  78. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  79. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  80. CERT_FILE = custom/https/cert.pem
  81. KEY_FILE = custom/https/key.pem
  82. ; Upper level of template and static file path
  83. ; default is the path where Gogs is executed
  84. STATIC_ROOT_PATH =
  85. ; Application level GZIP support
  86. ENABLE_GZIP = false
  87. ; Landing page for non-logged users, can be "home" or "explore"
  88. LANDING_PAGE = home
  89. [database]
  90. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  91. DB_TYPE = mysql
  92. HOST = 127.0.0.1:3306
  93. NAME = gogs
  94. USER = root
  95. PASSWD =
  96. ; For "postgres" only, either "disable", "require" or "verify-full"
  97. SSL_MODE = disable
  98. ; For "sqlite3" and "tidb", use absolute path when you start as service
  99. PATH = data/gogs.db
  100. [admin]
  101. [security]
  102. INSTALL_LOCK = false
  103. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  104. SECRET_KEY = !#@FDEWREWR&*(
  105. ; Auto-login remember days
  106. LOGIN_REMEMBER_DAYS = 7
  107. COOKIE_USERNAME = gogs_awesome
  108. COOKIE_REMEMBER_NAME = gogs_incredible
  109. ; Reverse proxy authentication header name of user name
  110. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  111. [service]
  112. ACTIVE_CODE_LIVE_MINUTES = 180
  113. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  114. ; User need to confirm e-mail for registration
  115. REGISTER_EMAIL_CONFIRM = false
  116. ; Does not allow register and admin create account only
  117. DISABLE_REGISTRATION = false
  118. ; User must sign in to view anything.
  119. REQUIRE_SIGNIN_VIEW = false
  120. ; Mail notification
  121. ENABLE_NOTIFY_MAIL = false
  122. ; More detail: https://github.com/gogits/gogs/issues/165
  123. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  124. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  125. ; Enable captcha validation for registration
  126. ENABLE_CAPTCHA = true
  127. ; Do not check minimum key size with corresponding type
  128. ENABLE_MINIMUM_KEY_SIZE_CHECK = false
  129. ; define allowed algorithms and their minimum key length (use -1 to disable a type)
  130. [service.minimum_key_sizes]
  131. ED25519 = 256
  132. ECDSA = 256
  133. RSA = 2048
  134. DSA = 1024
  135. [webhook]
  136. ; Hook task queue length
  137. QUEUE_LENGTH = 1000
  138. ; Deliver timeout in seconds
  139. DELIVER_TIMEOUT = 5
  140. ; Allow insecure certification
  141. SKIP_TLS_VERIFY = false
  142. ; Number of history information in each page
  143. PAGING_NUM = 10
  144. [mailer]
  145. ENABLED = false
  146. ; Buffer length of channel, keep it as it is if you don't know what it is.
  147. SEND_BUFFER_LEN = 100
  148. ; Name displayed in mail title
  149. SUBJECT = %(APP_NAME)s
  150. ; Mail server
  151. ; Gmail: smtp.gmail.com:587
  152. ; QQ: smtp.qq.com:25
  153. ; 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.
  154. HOST =
  155. ; Disable HELO operation when hostname are different.
  156. DISABLE_HELO =
  157. ; Custom hostname for HELO operation, default is from system.
  158. HELO_HOSTNAME =
  159. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  160. SKIP_VERIFY =
  161. ; Use client certificate
  162. USE_CERTIFICATE = false
  163. CERT_FILE = custom/mailer/cert.pem
  164. KEY_FILE = custom/mailer/key.pem
  165. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <[email protected]>` format
  166. FROM =
  167. ; Mailer user name and password
  168. USER =
  169. PASSWD =
  170. [cache]
  171. ; Either "memory", "redis", or "memcache", default is "memory"
  172. ADAPTER = memory
  173. ; For "memory" only, GC interval in seconds, default is 60
  174. INTERVAL = 60
  175. ; For "redis" and "memcache", connection host address
  176. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  177. ; memcache: `127.0.0.1:11211`
  178. HOST =
  179. [session]
  180. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  181. PROVIDER = memory
  182. ; Provider config options
  183. ; memory: not have any config yet
  184. ; file: session file path, e.g. `data/sessions`
  185. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  186. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  187. PROVIDER_CONFIG = data/sessions
  188. ; Session cookie name
  189. COOKIE_NAME = i_like_gogits
  190. ; If you use session in https only, default is false
  191. COOKIE_SECURE = false
  192. ; Enable set cookie, default is true
  193. ENABLE_SET_COOKIE = true
  194. ; Session GC time interval, default is 86400
  195. GC_INTERVAL_TIME = 86400
  196. ; Session life time, default is 86400
  197. SESSION_LIFE_TIME = 86400
  198. [picture]
  199. ; The place to picture data, either "server" or "qiniu", default is "server"
  200. SERVICE = server
  201. AVATAR_UPLOAD_PATH = data/avatars
  202. ; Chinese users can choose "duoshuo"
  203. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  204. GRAVATAR_SOURCE = gravatar
  205. DISABLE_GRAVATAR = false
  206. [attachment]
  207. ; Whether attachments are enabled. Defaults to `true`
  208. ENABLE = true
  209. ; Path for attachments. Defaults to `data/attachments`
  210. PATH = data/attachments
  211. ; One or more allowed types, e.g. image/jpeg|image/png
  212. ALLOWED_TYPES = image/jpeg|image/png
  213. ; Max size of each file. Defaults to 32MB
  214. MAX_SIZE = 4
  215. ; Max number of files per upload. Defaults to 10
  216. MAX_FILES = 5
  217. [time]
  218. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  219. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  220. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  221. FORMAT =
  222. [log]
  223. ROOT_PATH =
  224. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  225. ; Use comma to separate multiple modes, e.g. "console, file"
  226. MODE = console
  227. ; Buffer length of channel, keep it as it is if you don't know what it is.
  228. BUFFER_LEN = 10000
  229. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  230. LEVEL = Trace
  231. ; For "console" mode only
  232. [log.console]
  233. LEVEL =
  234. ; For "file" mode only
  235. [log.file]
  236. LEVEL =
  237. ; This enables automated log rotate(switch of following options), default is true
  238. LOG_ROTATE = true
  239. ; Max line number of single file, default is 1000000
  240. MAX_LINES = 1000000
  241. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  242. MAX_SIZE_SHIFT = 28
  243. ; Segment log daily, default is true
  244. DAILY_ROTATE = true
  245. ; Expired days of log file(delete after max days), default is 7
  246. MAX_DAYS = 7
  247. ; For "conn" mode only
  248. [log.conn]
  249. LEVEL =
  250. ; Reconnect host for every single message, default is false
  251. RECONNECT_ON_MSG = false
  252. ; Try to reconnect when connection is lost, default is false
  253. RECONNECT = false
  254. ; Either "tcp", "unix" or "udp", default is "tcp"
  255. PROTOCOL = tcp
  256. ; Host address
  257. ADDR =
  258. ; For "smtp" mode only
  259. [log.smtp]
  260. LEVEL =
  261. ; Name displayed in mail title, default is "Diagnostic message from server"
  262. SUBJECT = Diagnostic message from server
  263. ; Mail server
  264. HOST =
  265. ; Mailer user name and password
  266. USER =
  267. PASSWD =
  268. ; Receivers, can be one or more, e.g. ["[email protected]","[email protected]"]
  269. RECEIVERS =
  270. ; For "database" mode only
  271. [log.database]
  272. LEVEL =
  273. ; Either "mysql" or "postgres"
  274. DRIVER =
  275. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  276. CONN =
  277. [cron]
  278. ; Enable running cron tasks periodically.
  279. ENABLED = true
  280. ; Run cron tasks when Gogs starts.
  281. RUN_AT_START = false
  282. ; Update mirrors
  283. [cron.update_mirrors]
  284. SCHEDULE = @every 1h
  285. ; Repository health check
  286. [cron.repo_health_check]
  287. SCHEDULE = @every 24h
  288. TIMEOUT = 60s
  289. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  290. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  291. ARGS =
  292. ; Check repository statistics
  293. [cron.check_repo_stats]
  294. RUN_AT_START = true
  295. SCHEDULE = @every 24h
  296. [git]
  297. MAX_GIT_DIFF_LINES = 10000
  298. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  299. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  300. GC_ARGS =
  301. [i18n]
  302. LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT
  303. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano
  304. ; Used for datetimepicker
  305. [i18n.datelang]
  306. en-US = en
  307. zh-CN = zh
  308. zh-HK = zh-TW
  309. de-DE = de
  310. fr-FR = fr
  311. nl-NL = nl
  312. lv-LV = lv
  313. ru-RU = ru
  314. ja-JP = ja
  315. es-ES = es
  316. pt-BR = pt-BR
  317. pl-PL = pl
  318. bg-BG = bg
  319. it-IT = it
  320. ; Extension mapping to highlight class
  321. ; e.g. .toml=ini
  322. [highlight.mapping]
  323. [other]
  324. SHOW_FOOTER_BRANDING = false
  325. ; Show version information about gogs and go in the footer
  326. SHOW_FOOTER_VERSION = true