app.ini 8.9 KB

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