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

app.ini 6.1 kB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. ; App name that shows on every page title
  2. APP_NAME = Gogs: Go Git Service
  3. APP_LOGO = img/favicon.png
  4. ; Change it if you run locally
  5. RUN_USER = git
  6. ; Either "dev", "prod" or "test", default is "dev"
  7. RUN_MODE = dev
  8. [repository]
  9. ROOT =
  10. SCRIPT_TYPE = bash
  11. LANG_IGNS = Google Go|C|C++|Python|Ruby|C Sharp|Java|Objective-C|Android
  12. LICENSES = Apache v2 License|GPL v2|MIT License|Affero GPL|Artistic License 2.0|BSD (3-Clause) License
  13. [server]
  14. PROTOCOL = http
  15. DOMAIN = localhost
  16. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  17. HTTP_ADDR =
  18. HTTP_PORT = 3000
  19. ; Generate steps:
  20. ; $ cd path/to/gogs/custom/https
  21. ; $ go run $GOROOT/src/pkg/crypto/tls/generate_cert.go -ca=true -duration=8760h0m0s -host=myhost.example.com
  22. CERT_FILE = custom/https/cert.pem
  23. KEY_FILE = custom/https/key.pem
  24. [database]
  25. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  26. DB_TYPE = mysql
  27. HOST = 127.0.0.1:3306
  28. NAME = gogs
  29. USER = root
  30. PASSWD =
  31. ; For "postgres" only, either "disable", "require" or "verify-full"
  32. SSL_MODE = disable
  33. ; For "sqlite3" only
  34. PATH = data/gogs.db
  35. [admin]
  36. [security]
  37. INSTALL_LOCK = false
  38. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  39. SECRET_KEY = !#@FDEWREWR&*(
  40. ; Auto-login remember days
  41. LOGIN_REMEMBER_DAYS = 7
  42. COOKIE_USERNAME = gogs_awesome
  43. COOKIE_REMEMBER_NAME = gogs_incredible
  44. [service]
  45. ACTIVE_CODE_LIVE_MINUTES = 180
  46. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  47. ; User need to confirm e-mail for registration
  48. REGISTER_EMAIL_CONFIRM = false
  49. ; Does not allow register and admin create account only
  50. DISABLE_REGISTRATION = false
  51. ; User must sign in to view anything.
  52. REQUIRE_SIGNIN_VIEW = false
  53. ; Cache avatar as picture
  54. ENABLE_CACHE_AVATAR = false
  55. ; Mail notification
  56. ENABLE_NOTIFY_MAIL = false
  57. [mailer]
  58. ENABLED = false
  59. ; Buffer length of channel, keep it as it is if you don't know what it is.
  60. SEND_BUFFER_LEN = 10
  61. ; Name displayed in mail title
  62. SUBJECT = %(APP_NAME)s
  63. ; Mail server
  64. ; Gmail: smtp.gmail.com:587
  65. ; QQ: smtp.qq.com:25
  66. HOST =
  67. ; Mail from address
  68. FROM =
  69. ; Mailer user name and password
  70. USER =
  71. PASSWD =
  72. [oauth]
  73. ENABLED = false
  74. [oauth.github]
  75. ENABLED = false
  76. CLIENT_ID =
  77. CLIENT_SECRET =
  78. SCOPES = https://api.github.com/user
  79. AUTH_URL = https://github.com/login/oauth/authorize
  80. TOKEN_URL = https://github.com/login/oauth/access_token
  81. ; Get client id and secret from
  82. ; https://console.developers.google.com/project
  83. [oauth.google]
  84. ENABLED = false
  85. CLIENT_ID =
  86. CLIENT_SECRET =
  87. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  88. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  89. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  90. [oauth.qq]
  91. ENABLED = false
  92. CLIENT_ID =
  93. CLIENT_SECRET =
  94. SCOPES = all
  95. ; QQ 互联
  96. ; AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  97. ; TOKEN_URL = https://graph.qq.com/oauth2.0/token
  98. ; Tencent weibo
  99. AUTH_URL = https://open.t.qq.com/cgi-bin/oauth2/authorize
  100. TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token
  101. [oauth.twitter]
  102. ENABLED = false
  103. CLIENT_ID =
  104. CLIENT_SECRET =
  105. SCOPES = all
  106. AUTH_URL = https://api.twitter.com/oauth/authorize
  107. TOKEN_URL = https://api.twitter.com/oauth/access_token
  108. [oauth.weibo]
  109. ENABLED = false
  110. CLIENT_ID =
  111. CLIENT_SECRET =
  112. SCOPES = all
  113. AUTH_URL = https://api.weibo.com/oauth2/authorize
  114. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  115. [cache]
  116. ; Either "memory", "redis", or "memcache", default is "memory"
  117. ADAPTER = memory
  118. ; For "memory" only, GC interval in seconds, default is 60
  119. INTERVAL = 60
  120. ; For "redis" and "memcache", connection host address
  121. ; redis: ":6039"
  122. ; memcache: "127.0.0.1:11211"
  123. HOST =
  124. [session]
  125. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  126. PROVIDER = file
  127. ; Provider config options
  128. ; memory: not have any config yet
  129. ; file: session file path, e.g. data/sessions
  130. ; redis: config like redis server addr, poolSize, password, e.g. 127.0.0.1:6379,100,astaxie
  131. ; mysql: go-sql-driver/mysql dsn config string, e.g. root:password@/session_table
  132. PROVIDER_CONFIG = data/sessions
  133. ; Session cookie name
  134. COOKIE_NAME = i_like_gogits
  135. ; If you use session in https only, default is false
  136. COOKIE_SECURE = false
  137. ; Enable set cookie, default is true
  138. ENABLE_SET_COOKIE = true
  139. ; Session GC time interval, default is 86400
  140. GC_INTERVAL_TIME = 86400
  141. ; Session life time, default is 86400
  142. SESSION_LIFE_TIME = 86400
  143. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  144. SESSION_ID_HASHFUNC = sha1
  145. ; Session hash key, default is use random string
  146. SESSION_ID_HASHKEY =
  147. [picture]
  148. ; The place to picture data, either "server" or "qiniu", default is "server"
  149. SERVICE = server
  150. [log]
  151. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  152. MODE = console
  153. ; Buffer length of channel, keep it as it is if you don't know what it is.
  154. BUFFER_LEN = 10000
  155. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  156. LEVEL = Trace
  157. ; For "console" mode only
  158. [log.console]
  159. LEVEL =
  160. ; For "file" mode only
  161. [log.file]
  162. LEVEL =
  163. FILE_NAME = log/gogs.log
  164. ; This enables automated log rotate(switch of following options), default is true
  165. LOG_ROTATE = true
  166. ; Max line number of single file, default is 1000000
  167. MAX_LINES = 1000000
  168. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  169. MAX_SIZE_SHIFT = 28
  170. ; Segment log daily, default is true
  171. DAILY_ROTATE = true
  172. ; Expired days of log file(delete after max days), default is 7
  173. MAX_DAYS = 7
  174. ; For "conn" mode only
  175. [log.conn]
  176. LEVEL =
  177. ; Reconnect host for every single message, default is false
  178. RECONNECT_ON_MSG = false
  179. ; Try to reconnect when connection is lost, default is false
  180. RECONNECT = false
  181. ; Either "tcp", "unix" or "udp", default is "tcp"
  182. PROTOCOL = tcp
  183. ; Host address
  184. ADDR =
  185. ; For "smtp" mode only
  186. [log.smtp]
  187. LEVEL =
  188. ; Name displayed in mail title, default is "Diagnostic message from serve"
  189. SUBJECT = Diagnostic message from serve
  190. ; Mail server
  191. HOST =
  192. ; Mailer user name and password
  193. USER =
  194. PASSWD =
  195. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  196. RECEIVERS =
  197. ; For "database" mode only
  198. [log.database]
  199. LEVEL =
  200. Driver =
  201. CONN =