app.ini 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. AUTH_URL = https://open.t.qq.com/cgi-bin/oauth2/authorize
  91. TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token
  92. [oauth.twitter]
  93. ENABLED = false
  94. CLIENT_ID =
  95. CLIENT_SECRET =
  96. SCOPES = all
  97. AUTH_URL = https://api.twitter.com/oauth/authorize
  98. TOKEN_URL = https://api.twitter.com/oauth/access_token
  99. [oauth.weibo]
  100. ENABLED = false
  101. CLIENT_ID =
  102. CLIENT_SECRET =
  103. SCOPES = all
  104. AUTH_URL = https://api.weibo.com/oauth2/authorize
  105. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  106. [cache]
  107. ; Either "memory", "redis", or "memcache", default is "memory"
  108. ADAPTER = memory
  109. ; For "memory" only, GC interval in seconds, default is 60
  110. INTERVAL = 60
  111. ; For "redis" and "memcache", connection host address
  112. ; redis: ":6039"
  113. ; memcache: "127.0.0.1:11211"
  114. HOST =
  115. [session]
  116. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  117. PROVIDER = file
  118. ; Provider config options
  119. ; memory: not have any config yet
  120. ; file: session file path, e.g. data/sessions
  121. ; redis: config like redis server addr, poolSize, password, e.g. 127.0.0.1:6379,100,astaxie
  122. ; mysql: go-sql-driver/mysql dsn config string, e.g. root:password@/session_table
  123. PROVIDER_CONFIG = data/sessions
  124. ; Session cookie name
  125. COOKIE_NAME = i_like_gogits
  126. ; If you use session in https only, default is false
  127. COOKIE_SECURE = false
  128. ; Enable set cookie, default is true
  129. ENABLE_SET_COOKIE = true
  130. ; Session GC time interval, default is 86400
  131. GC_INTERVAL_TIME = 86400
  132. ; Session life time, default is 86400
  133. SESSION_LIFE_TIME = 86400
  134. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  135. SESSION_ID_HASHFUNC = sha1
  136. ; Session hash key, default is use random string
  137. SESSION_ID_HASHKEY =
  138. [picture]
  139. ; The place to picture data, either "server" or "qiniu", default is "server"
  140. SERVICE = server
  141. [log]
  142. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  143. MODE = console
  144. ; Buffer length of channel, keep it as it is if you don't know what it is.
  145. BUFFER_LEN = 10000
  146. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  147. LEVEL = Trace
  148. ; For "console" mode only
  149. [log.console]
  150. LEVEL =
  151. ; For "file" mode only
  152. [log.file]
  153. LEVEL =
  154. FILE_NAME = log/gogs.log
  155. ; This enables automated log rotate(switch of following options), default is true
  156. LOG_ROTATE = true
  157. ; Max line number of single file, default is 1000000
  158. MAX_LINES = 1000000
  159. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  160. MAX_SIZE_SHIFT = 28
  161. ; Segment log daily, default is true
  162. DAILY_ROTATE = true
  163. ; Expired days of log file(delete after max days), default is 7
  164. MAX_DAYS = 7
  165. ; For "conn" mode only
  166. [log.conn]
  167. LEVEL =
  168. ; Reconnect host for every single message, default is false
  169. RECONNECT_ON_MSG = false
  170. ; Try to reconnect when connection is lost, default is false
  171. RECONNECT = false
  172. ; Either "tcp", "unix" or "udp", default is "tcp"
  173. PROTOCOL = tcp
  174. ; Host address
  175. ADDR =
  176. ; For "smtp" mode only
  177. [log.smtp]
  178. LEVEL =
  179. ; Name displayed in mail title, default is "Diagnostic message from serve"
  180. SUBJECT = Diagnostic message from serve
  181. ; Mail server
  182. HOST =
  183. ; Mailer user name and password
  184. USER =
  185. PASSWD =
  186. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  187. RECEIVERS =
  188. ; For "database" mode only
  189. [log.database]
  190. LEVEL =
  191. Driver =
  192. CONN =