Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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