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 6.0KB

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