app.ini 11 KB

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