app.ini 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. ; The name of the system user that runs Gitote
  2. RUN_USER = git
  3. ; Either "dev", "prod" or "test"
  4. RUN_MODE = dev
  5. [server]
  6. PROTOCOL = http
  7. DOMAIN = localhost
  8. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  9. HTTP_ADDR = 0.0.0.0
  10. HTTP_PORT = 3000
  11. ; Permission for unix socket
  12. UNIX_SOCKET_PERMISSION = 666
  13. ; Local (DMZ) URL for Gitote workers (such as SSH update) accessing web service.
  14. ; In most cases you do not need to change the default value.
  15. ; Alter it only if your SSH server node is not the same as HTTP node.
  16. LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
  17. ; Disable SSH feature when not available
  18. DISABLE_SSH = false
  19. ; Whether use builtin SSH server or not.
  20. START_SSH_SERVER = false
  21. ; Domain name to be exposed in SSH clone URL
  22. SSH_DOMAIN = %(DOMAIN)s
  23. ; Port number to be exposed in SSH clone URL
  24. SSH_PORT = 22
  25. ; Network interface builtin SSH server listens on
  26. SSH_LISTEN_HOST = 0.0.0.0
  27. ; Port number builtin SSH server listens on
  28. SSH_LISTEN_PORT = %(SSH_PORT)s
  29. ; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  30. SSH_ROOT_PATH =
  31. ; Indicate whether to rewrite authorized_keys at start, ignored when use builtin SSH server
  32. REWRITE_AUTHORIZED_KEYS_AT_START = false
  33. ; Choose the ciphers to support for SSH connections
  34. SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128
  35. ; Directory to create temporary files when test publick key using ssh-keygen,
  36. ; default is system temporary directory.
  37. SSH_KEY_TEST_PATH =
  38. ; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
  39. SSH_KEYGEN_PATH = ssh-keygen
  40. ; Indicate whether to check minimum key size with corresponding type
  41. MINIMUM_KEY_SIZE_CHECK = false
  42. ; Disable CDN even in "prod" mode
  43. OFFLINE_MODE = false
  44. DISABLE_ROUTER_LOG = false
  45. ; Generate steps:
  46. ; $ ./gitote cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  47. ;
  48. ; Or from a .pfx file exported from the Windows certificate store (do
  49. ; not forget to export the private key):
  50. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  51. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  52. CERT_FILE = custom/https/cert.pem
  53. KEY_FILE = custom/https/key.pem
  54. ; Allowed TLS version values: SSL30, TLS10, TLS11, TLS12
  55. TLS_MIN_VERSION = TLS10
  56. ; Upper level of template and static file path
  57. ; default is the path where Gitote is executed
  58. STATIC_ROOT_PATH =
  59. ; Default path for App data
  60. APP_DATA_PATH = data
  61. ; Application level GZIP support
  62. ENABLE_GZIP = false
  63. ; Landing page for non-logged users, can be "home" or "explore"
  64. LANDING_PAGE = home
  65. [repository]
  66. ; Root path for storing repositories's data, default is "~/<username>/gitote-repositories"
  67. ROOT =
  68. ; The script type server supports, sometimes could be "sh"
  69. SCRIPT_TYPE = bash
  70. ; Default ANSI charset for an unrecognized charset
  71. ANSI_CHARSET =
  72. ; Force every new repository to be private
  73. FORCE_PRIVATE = false
  74. ; Global maximum creation limit of repository per user, -1 means no limit
  75. MAX_CREATION_LIMIT = -1
  76. ; Mirror sync queue length, increase if mirror syncing starts hanging
  77. MIRROR_QUEUE_LENGTH = 1000
  78. ; Patch test queue length, increase if pull request patch testing starts hanging
  79. PULL_REQUEST_QUEUE_LENGTH = 1000
  80. ; Preferred Licenses to place at the top of the list
  81. ; Name must match file name in conf/license or custom/conf/license
  82. PREFERRED_LICENSES = Apache License 2.0,MIT License
  83. ; Disable ability to interact with repositories by HTTP protocol
  84. DISABLE_HTTP_GIT = false
  85. ; Enable ability to migrate repository by local path
  86. ENABLE_LOCAL_PATH_MIGRATION = false
  87. ; Concurrency is used to retrieve commits information. This variable define
  88. ; the maximum number of tasks that can be run at the same time. Usually, the
  89. ; value depend of how many CPUs (cores) you have. If the value is set to zero
  90. ; or under, GITOTE will automatically detect the number of CPUs your system have
  91. COMMITS_FETCH_CONCURRENCY = 0
  92. ; Enable render mode for raw file
  93. ENABLE_RAW_FILE_RENDER_MODE = false
  94. [repository.editor]
  95. ; List of file extensions that should have line wraps in the CodeMirror editor.
  96. ; Separate extensions with a comma. To line wrap files without extension, just put a comma
  97. LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
  98. ; Valid file modes that have a preview API associated with them, such as api/v1/markdown.
  99. ; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
  100. PREVIEWABLE_FILE_MODES = markdown
  101. [repository.upload]
  102. ; Enable repository file uploads.
  103. ENABLED = true
  104. ; Path to temporarily store uploads (default path gets cleaned by Gitote in every start)
  105. TEMP_PATH = data/tmp/uploads
  106. ; File types that are allowed to be uploaded, e.g. image/jpeg|image/png. Leave empty means allow any file type
  107. ALLOWED_TYPES =
  108. ; Maximum size of each file in MB
  109. FILE_MAX_SIZE = 3
  110. ; Maximum number of files per upload
  111. MAX_FILES = 5
  112. ; Attachment settings for releases
  113. [release.attachment]
  114. ; Whether attachments are enabled. Defaults to `true`
  115. ENABLED = true
  116. ; Path for attachments. Defaults to `data/attachments`
  117. PATH = data/attachments
  118. ; One or more allowed types, e.g. image/jpeg|image/png
  119. ALLOWED_TYPES = */*
  120. ; Max size of each file. Defaults to 32MB
  121. MAX_SIZE = 32
  122. ; Max number of files per upload. Defaults to 10
  123. MAX_FILES = 10
  124. [markdown]
  125. ; Enable hard line break extension
  126. ENABLE_HARD_LINE_BREAK = false
  127. ; List of custom URL-Schemes that are allowed as links when rendering Markdown
  128. ; for example git,magnet
  129. CUSTOM_URL_SCHEMES =
  130. ; List of file extensions that should be rendered/edited as Markdown
  131. ; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
  132. FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
  133. [smartypants]
  134. ENABLED = false
  135. FRACTIONS = true
  136. DASHES = true
  137. LATEX_DASHES = true
  138. ANGLED_QUOTES = true
  139. [http]
  140. ; Value for Access-Control-Allow-Origin header, default is not to present
  141. ACCESS_CONTROL_ALLOW_ORIGIN =
  142. ; Define allowed algorithms and their minimum key length (use -1 to disable a type)
  143. [ssh.minimum_key_sizes]
  144. ED25519 = 256
  145. ECDSA = 256
  146. RSA = 2048
  147. DSA = 1024
  148. [database]
  149. ; Either "mysql", "postgres" or "sqlite3", you can connect to TiDB with MySQL protocol
  150. DB_TYPE = mysql
  151. HOST = 127.0.0.1:3306
  152. NAME = gitote
  153. USER = root
  154. PASSWD =
  155. ; For "postgres" only, either "disable", "require" or "verify-full"
  156. SSL_MODE = disable
  157. ; For "sqlite3" and "tidb", use absolute path when you start as service
  158. PATH = data/gitote.db
  159. [admin]
  160. ; Disable regular (non-admin) users to create organizations
  161. DISABLE_REGULAR_ORG_CREATION = false
  162. [security]
  163. INSTALL_LOCK = false
  164. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  165. SECRET_KEY = !#@FDEWREWR&*(
  166. ; Auto-login remember days
  167. LOGIN_REMEMBER_DAYS = 7
  168. COOKIE_USERNAME = gitote_awesome
  169. COOKIE_REMEMBER_NAME = gitote_incredible
  170. COOKIE_SECURE = false
  171. ; Reverse proxy authentication header name of user name
  172. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  173. ; Enable to set cookie to indicate user login status
  174. ENABLE_LOGIN_STATUS_COOKIE = false
  175. LOGIN_STATUS_COOKIE_NAME = login_status
  176. [service]
  177. ACTIVE_CODE_LIVE_MINUTES = 180
  178. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  179. ; User need to confirm e-mail for registration
  180. REGISTER_EMAIL_CONFIRM = false
  181. ; Does not allow register and admin create account only
  182. DISABLE_REGISTRATION = false
  183. ; User must sign in to view anything.
  184. REQUIRE_SIGNIN_VIEW = false
  185. ; Mail notification
  186. ENABLE_NOTIFY_MAIL = false
  187. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  188. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  189. ; Enable captcha validation for registration
  190. ENABLE_CAPTCHA = true
  191. [webhook]
  192. ; Types are enabled for users to use, can be "gitote", "slack", "discord"
  193. TYPES = gitote, slack, discord
  194. ; Hook task queue length, increase if webhook shooting starts hanging
  195. QUEUE_LENGTH = 1000
  196. ; Deliver timeout in seconds
  197. DELIVER_TIMEOUT = 15
  198. ; Allow insecure certification
  199. SKIP_TLS_VERIFY = false
  200. ; Number of history information in each page
  201. PAGING_NUM = 10
  202. [mailer]
  203. ENABLED = false
  204. ; Buffer length of channel, keep it as it is if you don't know what it is.
  205. SEND_BUFFER_LEN = 100
  206. ; Prefix prepended to the subject line
  207. SUBJECT_PREFIX = `[%(APP_NAME)s] `
  208. ; Mail server
  209. ; Gmail: smtp.gmail.com:587
  210. ; QQ: smtp.qq.com:465
  211. ; 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.
  212. HOST =
  213. ; Disable HELO operation when hostname are different.
  214. DISABLE_HELO =
  215. ; Custom hostname for HELO operation, default is from system.
  216. HELO_HOSTNAME =
  217. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  218. SKIP_VERIFY =
  219. ; Use client certificate
  220. USE_CERTIFICATE = false
  221. CERT_FILE = custom/mailer/cert.pem
  222. KEY_FILE = custom/mailer/key.pem
  223. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  224. FROM =
  225. ; Mailer user name and password
  226. USER =
  227. PASSWD =
  228. ; Use text/plain as format of content
  229. USE_PLAIN_TEXT = false
  230. ; If sending html emails, then also attach a plaintext alternative to the MIME message, to support older mail clients and make spam filters happier.
  231. ADD_PLAIN_TEXT_ALT = false
  232. [cache]
  233. ; Either "memory", "redis", or "memcache", default is "memory"
  234. ADAPTER = memory
  235. ; For "memory" only, GC interval in seconds, default is 60
  236. INTERVAL = 60
  237. ; For "redis" and "memcache", connection host address
  238. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  239. ; memcache: `127.0.0.1:11211`
  240. HOST =
  241. [session]
  242. ; Either "memory", "file", or "redis", default is "memory"
  243. PROVIDER = memory
  244. ; Provider config options
  245. ; memory: not have any config yet
  246. ; file: session file path, e.g. `data/sessions`
  247. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  248. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  249. PROVIDER_CONFIG = data/sessions
  250. ; Session cookie name
  251. COOKIE_NAME = gitote_sess
  252. ; If you use session in https only, default is false
  253. COOKIE_SECURE = false
  254. ; Enable set cookie, default is true
  255. ENABLE_SET_COOKIE = true
  256. ; Session GC time interval, default is 3600
  257. GC_INTERVAL_TIME = 3600
  258. ; Session life time, default is 86400
  259. SESSION_LIFE_TIME = 86400
  260. ; Cookie name for CSRF
  261. CSRF_COOKIE_NAME = _csrf
  262. [picture]
  263. ; Path to store user uploaded avatars
  264. AVATAR_UPLOAD_PATH = data/avatars
  265. ; Path to store repository uploaded avatars
  266. REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
  267. ; Chinese users can choose "duoshuo"
  268. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  269. GRAVATAR_SOURCE = gravatar
  270. ; This value will be forced to be true in offline mode.
  271. DISABLE_GRAVATAR = false
  272. ; Federated avatar lookup uses DNS to discover avatar associated
  273. ; with emails, see https://www.libravatar.org
  274. ; This value will be forced to be false in offline mode or Gravatar is disbaled.
  275. ENABLE_FEDERATED_AVATAR = false
  276. ; Attachment settings for issues
  277. [attachment]
  278. ; Whether attachments are enabled. Defaults to `true`
  279. ENABLED = true
  280. ; Path for attachments. Defaults to `data/attachments`
  281. PATH = data/attachments
  282. ; One or more allowed types, e.g. image/jpeg|image/png
  283. ALLOWED_TYPES = image/jpeg|image/png
  284. ; Max size of each file. Defaults to 4MB
  285. MAX_SIZE = 4
  286. ; Max number of files per upload. Defaults to 5
  287. MAX_FILES = 5
  288. [time]
  289. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  290. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  291. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  292. FORMAT =
  293. ; General settings of loggers
  294. [log]
  295. ROOT_PATH =
  296. ; Can be "console" and "file", default is "console"
  297. ; Use comma to separate multiple modes, e.g. "console, file, discord, slack"
  298. MODE = console
  299. ; Buffer length of channel, keep it as it is if you don't know what it is.
  300. BUFFER_LEN = 100
  301. ; Either "Trace", "Info", "Warn", "Error", "Fatal", default is "Trace"
  302. LEVEL = Trace
  303. ; For "console" mode only
  304. [log.console]
  305. ; Comment out to inherit
  306. ; LEVEL =
  307. ; For "file" mode only
  308. [log.file]
  309. ; Comment out to inherit
  310. ; LEVEL =
  311. ; This enables automated log rotate (switch of following options)
  312. LOG_ROTATE = true
  313. ; Segment log daily
  314. DAILY_ROTATE = true
  315. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  316. MAX_SIZE_SHIFT = 28
  317. ; Max line number of single file
  318. MAX_LINES = 1000000
  319. ; Expired days of log file (delete after max days)
  320. MAX_DAYS = 7
  321. ; For "slack" mode only
  322. [log.slack]
  323. ; Comment out to inherit
  324. ; LEVEL =
  325. ; Webhook URL
  326. URL =
  327. [log.discord]
  328. ; Comment out to inherit
  329. ; LEVEL =
  330. ; Webhook URL
  331. URL =
  332. ; Username displayed in webhook
  333. USERNAME = %(APP_NAME)s
  334. [log.xorm]
  335. ; Enable file rotation
  336. ROTATE = true
  337. ; Rotate every day
  338. ROTATE_DAILY = true
  339. ; Rotate once file size excesses x MB
  340. MAX_SIZE = 100
  341. ; Maximum days to keep logger files
  342. MAX_DAYS = 3
  343. [cron]
  344. ; Enable running cron tasks periodically.
  345. ENABLED = true
  346. ; Run cron tasks when Gitote starts.
  347. RUN_AT_START = false
  348. ; Update mirrors
  349. [cron.update_mirrors]
  350. SCHEDULE = @every 10m
  351. ; Repository health check
  352. [cron.repo_health_check]
  353. SCHEDULE = @every 24h
  354. TIMEOUT = 60s
  355. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  356. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  357. ARGS =
  358. ; Check repository statistics
  359. [cron.check_repo_stats]
  360. RUN_AT_START = true
  361. SCHEDULE = @every 24h
  362. ; Cleanup repository archives
  363. [cron.repo_archive_cleanup]
  364. RUN_AT_START = false
  365. SCHEDULE = @every 24h
  366. ; Time duration to check if archive should be cleaned
  367. OLDER_THAN = 24h
  368. [git]
  369. ; Disables highlight of added and removed changes
  370. DISABLE_DIFF_HIGHLIGHT = false
  371. ; Max number of lines allowed of a single file in diff view
  372. MAX_GIT_DIFF_LINES = 1000
  373. ; Max number of characters of a line allowed in diff view
  374. MAX_GIT_DIFF_LINE_CHARACTERS = 500
  375. ; Max number of files shown in diff view
  376. MAX_GIT_DIFF_FILES = 100
  377. ; Arguments for command 'git gc', e.g. "--aggressive --auto"
  378. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  379. GC_ARGS =
  380. ; Operation timeout in seconds
  381. [git.timeout]
  382. MIGRATE = 600
  383. MIRROR = 300
  384. CLONE = 300
  385. PULL = 300
  386. GC = 60
  387. [mirror]
  388. ; Default interval in hours between each check
  389. DEFAULT_INTERVAL = 8
  390. [api]
  391. ; Max number of items will response in a page
  392. MAX_RESPONSE_ITEMS = 50
  393. [ui]
  394. ; Number of repositories that are showed in one explore page
  395. EXPLORE_PAGING_NUM = 20
  396. ; Number of issues that are showed in one page
  397. ISSUE_PAGING_NUM = 10
  398. ; Number of maximum commits showed in one activity feed
  399. FEED_MAX_COMMIT_NUM = 5
  400. ; Max size in bytes of files to be displayed (default is 8MB)
  401. MAX_DISPLAY_FILE_SIZE = 8388608
  402. [ui.admin]
  403. ; Number of users that are showed in one page
  404. USER_PAGING_NUM = 50
  405. ; Number of repos that are showed in one page
  406. REPO_PAGING_NUM = 50
  407. ; Number of notices that are showed in one page
  408. NOTICE_PAGING_NUM = 25
  409. ; Number of organization that are showed in one page
  410. ORG_PAGING_NUM = 50
  411. [ui.user]
  412. ; Number of repos that are showed in one page
  413. REPO_PAGING_NUM = 15
  414. ; Number of news feeds that are showed in one page
  415. NEWS_FEED_PAGING_NUM = 20
  416. ; Number of commits that are showed in one page
  417. COMMITS_PAGING_NUM = 30
  418. [prometheus]
  419. ENABLED = true
  420. ENABLE_BASIC_AUTH = false
  421. BASIC_AUTH_USERNAME =
  422. BASIC_AUTH_PASSWORD =
  423. [i18n]
  424. LANGS = en-US,en-GB
  425. NAMES = English US,English UK
  426. ; Used for datetimepicker
  427. [i18n.datelang]
  428. en-US = en
  429. en-GB = en-GB
  430. ; Extension mapping to highlight class
  431. ; e.g. .toml=ini
  432. [highlight.mapping]