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.

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