app.ini 12 KB

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