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.

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