app.ini 8.7 KB

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