app.ini 9.8 KB

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