app.ini 8.8 KB

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