app.ini 9.7 KB

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