app.ini 11 KB

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