You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.ini 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. ; App name that shows on every page title
  2. APP_NAME = Gogs: Go Git Service
  3. ; Change it if you run locally
  4. RUN_USER = git
  5. ; Either "dev", "prod" or "test", default is "dev"
  6. RUN_MODE = dev
  7. [repository]
  8. ROOT =
  9. SCRIPT_TYPE = bash
  10. [server]
  11. PROTOCOL = http
  12. DOMAIN = localhost
  13. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  14. HTTP_ADDR =
  15. HTTP_PORT = 3000
  16. SSH_PORT = 22
  17. ; Disable CDN even in "prod" mode
  18. OFFLINE_MODE = false
  19. DISABLE_ROUTER_LOG = false
  20. ; Generate steps:
  21. ; $ cd path/to/gogs/custom/https
  22. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  23. CERT_FILE = custom/https/cert.pem
  24. KEY_FILE = custom/https/key.pem
  25. ; Upper level of template and static file path
  26. ; default is the path where Gogs is executed
  27. STATIC_ROOT_PATH =
  28. ; Application level GZIP support
  29. ENABLE_GZIP = false
  30. [database]
  31. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  32. DB_TYPE = mysql
  33. HOST = 127.0.0.1:3306
  34. NAME = gogs
  35. USER = root
  36. PASSWD =
  37. ; For "postgres" only, either "disable", "require" or "verify-full"
  38. SSL_MODE = disable
  39. ; For "sqlite3" only
  40. PATH = data/gogs.db
  41. [admin]
  42. [security]
  43. INSTALL_LOCK = false
  44. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  45. SECRET_KEY = !#@FDEWREWR&*(
  46. ; Auto-login remember days
  47. LOGIN_REMEMBER_DAYS = 7
  48. COOKIE_USERNAME = gogs_awesome
  49. COOKIE_REMEMBER_NAME = gogs_incredible
  50. ; Reverse proxy authentication header name of user name
  51. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  52. [service]
  53. ACTIVE_CODE_LIVE_MINUTES = 180
  54. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  55. ; User need to confirm e-mail for registration
  56. REGISTER_EMAIL_CONFIRM = false
  57. ; Does not allow register and admin create account only
  58. DISABLE_REGISTRATION = false
  59. ; User must sign in to view anything.
  60. REQUIRE_SIGNIN_VIEW = false
  61. ; Cache avatar as picture
  62. ENABLE_CACHE_AVATAR = false
  63. ; Mail notification
  64. ENABLE_NOTIFY_MAIL = false
  65. ; More detail: https://github.com/gogits/gogs/issues/165
  66. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  67. ; Repository Git hooks
  68. ENABLE_GIT_HOOKS = false
  69. [webhook]
  70. ; Cron task interval in minutes
  71. TASK_INTERVAL = 1
  72. ; Deliver timeout in seconds
  73. DELIVER_TIMEOUT = 5
  74. [mailer]
  75. ENABLED = false
  76. ; Buffer length of channel, keep it as it is if you don't know what it is.
  77. SEND_BUFFER_LEN = 10
  78. ; Name displayed in mail title
  79. SUBJECT = %(APP_NAME)s
  80. ; Mail server
  81. ; Gmail: smtp.gmail.com:587
  82. ; QQ: smtp.qq.com:25
  83. HOST =
  84. ; Mail from address
  85. FROM =
  86. ; Mailer user name and password
  87. USER =
  88. PASSWD =
  89. [oauth]
  90. ENABLED = false
  91. [oauth.github]
  92. ENABLED = false
  93. CLIENT_ID =
  94. CLIENT_SECRET =
  95. SCOPES = https://api.github.com/user
  96. AUTH_URL = https://github.com/login/oauth/authorize
  97. TOKEN_URL = https://github.com/login/oauth/access_token
  98. ; Get client id and secret from
  99. ; https://console.developers.google.com/project
  100. [oauth.google]
  101. ENABLED = false
  102. CLIENT_ID =
  103. CLIENT_SECRET =
  104. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  105. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  106. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  107. [oauth.qq]
  108. ENABLED = false
  109. CLIENT_ID =
  110. CLIENT_SECRET =
  111. SCOPES = all
  112. ; QQ 互联
  113. ; AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  114. ; TOKEN_URL = https://graph.qq.com/oauth2.0/token
  115. ; Tencent weibo
  116. AUTH_URL = https://open.t.qq.com/cgi-bin/oauth2/authorize
  117. TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token
  118. [oauth.weibo]
  119. ENABLED = false
  120. CLIENT_ID =
  121. CLIENT_SECRET =
  122. SCOPES = all
  123. AUTH_URL = https://api.weibo.com/oauth2/authorize
  124. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  125. [cache]
  126. ; Either "memory", "redis", or "memcache", default is "memory"
  127. ADAPTER = memory
  128. ; For "memory" only, GC interval in seconds, default is 60
  129. INTERVAL = 60
  130. ; For "redis" and "memcache", connection host address
  131. ; redis: `:6039`
  132. ; memcache: `127.0.0.1:11211`
  133. HOST =
  134. [session]
  135. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  136. PROVIDER = file
  137. ; Provider config options
  138. ; memory: not have any config yet
  139. ; file: session file path, e.g. `data/sessions`
  140. ; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,gogs`
  141. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  142. PROVIDER_CONFIG = data/sessions
  143. ; Session cookie name
  144. COOKIE_NAME = i_like_gogits
  145. ; If you use session in https only, default is false
  146. COOKIE_SECURE = false
  147. ; Enable set cookie, default is true
  148. ENABLE_SET_COOKIE = true
  149. ; Session GC time interval, default is 86400
  150. GC_INTERVAL_TIME = 86400
  151. ; Session life time, default is 86400
  152. SESSION_LIFE_TIME = 86400
  153. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  154. SESSION_ID_HASHFUNC = sha1
  155. ; Session hash key, default is use random string
  156. SESSION_ID_HASHKEY =
  157. [picture]
  158. ; The place to picture data, either "server" or "qiniu", default is "server"
  159. SERVICE = server
  160. DISABLE_GRAVATAR = false
  161. [attachment]
  162. ; Whether attachments are enabled. Defaults to `true`
  163. ENABLE = true
  164. ; Path for attachments. Defaults to `data/attachments`
  165. PATH = data/attachments
  166. ; One or more allowed types, e.g. image/jpeg|image/png
  167. ALLOWED_TYPES = image/jpeg|image/png
  168. ; Max size of each file. Defaults to 32MB
  169. MAX_SIZE = 32
  170. ; Max number of files per upload. Defaults to 10
  171. MAX_FILES = 10
  172. [time]
  173. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  174. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  175. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  176. FORMAT =
  177. [log]
  178. ROOT_PATH =
  179. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  180. ; Use comma to separate multiple modes, e.g. "console, file"
  181. MODE = console
  182. ; Buffer length of channel, keep it as it is if you don't know what it is.
  183. BUFFER_LEN = 10000
  184. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  185. LEVEL = Trace
  186. ; For "console" mode only
  187. [log.console]
  188. LEVEL =
  189. ; For "file" mode only
  190. [log.file]
  191. LEVEL =
  192. ; This enables automated log rotate(switch of following options), default is true
  193. LOG_ROTATE = true
  194. ; Max line number of single file, default is 1000000
  195. MAX_LINES = 1000000
  196. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  197. MAX_SIZE_SHIFT = 28
  198. ; Segment log daily, default is true
  199. DAILY_ROTATE = true
  200. ; Expired days of log file(delete after max days), default is 7
  201. MAX_DAYS = 7
  202. ; For "conn" mode only
  203. [log.conn]
  204. LEVEL =
  205. ; Reconnect host for every single message, default is false
  206. RECONNECT_ON_MSG = false
  207. ; Try to reconnect when connection is lost, default is false
  208. RECONNECT = false
  209. ; Either "tcp", "unix" or "udp", default is "tcp"
  210. PROTOCOL = tcp
  211. ; Host address
  212. ADDR =
  213. ; For "smtp" mode only
  214. [log.smtp]
  215. LEVEL =
  216. ; Name displayed in mail title, default is "Diagnostic message from serve"
  217. SUBJECT = Diagnostic message from serve
  218. ; Mail server
  219. HOST =
  220. ; Mailer user name and password
  221. USER =
  222. PASSWD =
  223. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  224. RECEIVERS =
  225. ; For "database" mode only
  226. [log.database]
  227. LEVEL =
  228. ; Either "mysql" or "postgres"
  229. DRIVER =
  230. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  231. CONN =
  232. [git]
  233. MAX_GITDIFF_LINES = 10000
  234. [i18n]
  235. LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL
  236. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands