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