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.

app.ini 9.7KB

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