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 10KB

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