app.ini 11 KB

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