app.ini 9.3 KB

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