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.

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