You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

350 lines
10 KiB

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