app.ini 9.1 KB

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