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.

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