app.ini 5.7 KB

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