app.ini 5.7 KB

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