app.ini 6.0 KB

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