app.ini 9.0 KB

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