app.ini 9.4 KB

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