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.

345 lines
9.9 KiB

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