app.ini 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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. [webhook]
  93. ; Hook task queue length
  94. QUEUE_LENGTH = 1000
  95. ; Deliver timeout in seconds
  96. DELIVER_TIMEOUT = 5
  97. ; Allow insecure certification
  98. SKIP_TLS_VERIFY = false
  99. ; Number of history information in each page
  100. PAGING_NUM = 10
  101. [mailer]
  102. ENABLED = false
  103. ; Buffer length of channel, keep it as it is if you don't know what it is.
  104. SEND_BUFFER_LEN = 10
  105. ; Name displayed in mail title
  106. SUBJECT = %(APP_NAME)s
  107. ; Mail server
  108. ; Gmail: smtp.gmail.com:587
  109. ; QQ: smtp.qq.com:25
  110. ; 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.
  111. HOST =
  112. ; Disable HELO operation when hostname are different.
  113. DISABLE_HELO =
  114. ; Custom hostname for HELO operation, default is from system.
  115. HELO_HOSTNAME =
  116. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  117. SKIP_VERIFY =
  118. ; Use client certificate
  119. USE_CERTIFICATE = false
  120. CERT_FILE = custom/mailer/cert.pem
  121. KEY_FILE = custom/mailer/key.pem
  122. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  123. FROM =
  124. ; Mailer user name and password
  125. USER =
  126. PASSWD =
  127. [oauth]
  128. ENABLED = false
  129. [oauth.github]
  130. ENABLED = false
  131. CLIENT_ID =
  132. CLIENT_SECRET =
  133. SCOPES = https://api.github.com/user
  134. AUTH_URL = https://github.com/login/oauth/authorize
  135. TOKEN_URL = https://github.com/login/oauth/access_token
  136. ; Get client id and secret from
  137. ; https://console.developers.google.com/project
  138. [oauth.google]
  139. ENABLED = false
  140. CLIENT_ID =
  141. CLIENT_SECRET =
  142. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  143. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  144. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  145. [oauth.qq]
  146. ENABLED = false
  147. CLIENT_ID =
  148. CLIENT_SECRET =
  149. SCOPES = get_user_info
  150. ; QQ 互联
  151. AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  152. TOKEN_URL = https://graph.qq.com/oauth2.0/token
  153. [oauth.weibo]
  154. ENABLED = false
  155. CLIENT_ID =
  156. CLIENT_SECRET =
  157. SCOPES = all
  158. AUTH_URL = https://api.weibo.com/oauth2/authorize
  159. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  160. [cache]
  161. ; Either "memory", "redis", or "memcache", default is "memory"
  162. ADAPTER = memory
  163. ; For "memory" only, GC interval in seconds, default is 60
  164. INTERVAL = 60
  165. ; For "redis" and "memcache", connection host address
  166. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  167. ; memcache: `127.0.0.1:11211`
  168. HOST =
  169. [session]
  170. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  171. PROVIDER = memory
  172. ; Provider config options
  173. ; memory: not have any config yet
  174. ; file: session file path, e.g. `data/sessions`
  175. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  176. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  177. PROVIDER_CONFIG = data/sessions
  178. ; Session cookie name
  179. COOKIE_NAME = i_like_gogits
  180. ; If you use session in https only, default is false
  181. COOKIE_SECURE = false
  182. ; Enable set cookie, default is true
  183. ENABLE_SET_COOKIE = true
  184. ; Session GC time interval, default is 86400
  185. GC_INTERVAL_TIME = 86400
  186. ; Session life time, default is 86400
  187. SESSION_LIFE_TIME = 86400
  188. [picture]
  189. ; The place to picture data, either "server" or "qiniu", default is "server"
  190. SERVICE = server
  191. AVATAR_UPLOAD_PATH = data/avatars
  192. ; Chinese users can choose "duoshuo"
  193. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  194. GRAVATAR_SOURCE = gravatar
  195. DISABLE_GRAVATAR = false
  196. [attachment]
  197. ; Whether attachments are enabled. Defaults to `true`
  198. ENABLE = true
  199. ; Path for attachments. Defaults to `data/attachments`
  200. PATH = data/attachments
  201. ; One or more allowed types, e.g. image/jpeg|image/png
  202. ALLOWED_TYPES = image/jpeg|image/png
  203. ; Max size of each file. Defaults to 32MB
  204. MAX_SIZE = 4
  205. ; Max number of files per upload. Defaults to 10
  206. MAX_FILES = 5
  207. [time]
  208. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  209. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  210. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  211. FORMAT =
  212. [log]
  213. ROOT_PATH =
  214. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  215. ; Use comma to separate multiple modes, e.g. "console, file"
  216. MODE = console
  217. ; Buffer length of channel, keep it as it is if you don't know what it is.
  218. BUFFER_LEN = 10000
  219. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  220. LEVEL = Trace
  221. ; For "console" mode only
  222. [log.console]
  223. LEVEL =
  224. ; For "file" mode only
  225. [log.file]
  226. LEVEL =
  227. ; This enables automated log rotate(switch of following options), default is true
  228. LOG_ROTATE = true
  229. ; Max line number of single file, default is 1000000
  230. MAX_LINES = 1000000
  231. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  232. MAX_SIZE_SHIFT = 28
  233. ; Segment log daily, default is true
  234. DAILY_ROTATE = true
  235. ; Expired days of log file(delete after max days), default is 7
  236. MAX_DAYS = 7
  237. ; For "conn" mode only
  238. [log.conn]
  239. LEVEL =
  240. ; Reconnect host for every single message, default is false
  241. RECONNECT_ON_MSG = false
  242. ; Try to reconnect when connection is lost, default is false
  243. RECONNECT = false
  244. ; Either "tcp", "unix" or "udp", default is "tcp"
  245. PROTOCOL = tcp
  246. ; Host address
  247. ADDR =
  248. ; For "smtp" mode only
  249. [log.smtp]
  250. LEVEL =
  251. ; Name displayed in mail title, default is "Diagnostic message from serve"
  252. SUBJECT = Diagnostic message from serve
  253. ; Mail server
  254. HOST =
  255. ; Mailer user name and password
  256. USER =
  257. PASSWD =
  258. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  259. RECEIVERS =
  260. ; For "database" mode only
  261. [log.database]
  262. LEVEL =
  263. ; Either "mysql" or "postgres"
  264. DRIVER =
  265. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  266. CONN =
  267. [cron]
  268. ; Enable running cron tasks periodically.
  269. ENABLED = true
  270. ; Run cron tasks when Gogs starts.
  271. RUN_AT_START = false
  272. ; Update mirrors
  273. [cron.update_mirrors]
  274. SCHEDULE = @every 1h
  275. ; Repository health check
  276. [cron.repo_health_check]
  277. SCHEDULE = @every 24h
  278. ; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
  279. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  280. ARGS =
  281. ; Check repository statistics
  282. [cron.check_repo_stats]
  283. RUN_AT_START = true
  284. SCHEDULE = @every 24h
  285. [git]
  286. MAX_GIT_DIFF_LINES = 10000
  287. ; Arguments for command 'git gc', e.g.: "--aggressive --auto"
  288. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  289. GC_ARGS =
  290. [i18n]
  291. 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
  292. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本語,Español,Português do Brasil,Polski,български,Italiano
  293. ; Used for datetimepicker
  294. [i18n.datelang]
  295. en-US = en
  296. zh-CN = zh
  297. zh-HK = zh-TW
  298. de-DE = de
  299. fr-FR = fr
  300. nl-NL = nl
  301. lv-LV = lv
  302. ru-RU = ru
  303. ja-JP = ja
  304. es-ES = es
  305. pt-BR = pt-BR
  306. pl-PL = pl
  307. bg-BG = bg
  308. it-IT = it
  309. [other]
  310. SHOW_FOOTER_BRANDING = false