Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

app.ini 8.4KB

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