mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-23 19:08:35 +08:00
分库分表功能提交
This commit is contained in:
125
docker/shardingproxy/conf/config-database-discovery.yaml
Normal file
125
docker/shardingproxy/conf/config-database-discovery.yaml
Normal file
@@ -0,0 +1,125 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
######################################################################################################
|
||||
#
|
||||
# Here you can configure the rules for the proxy.
|
||||
# This example is configuration of HA rule.
|
||||
#
|
||||
######################################################################################################
|
||||
#
|
||||
#schemaName: database_discovery_db
|
||||
#
|
||||
#dataSources:
|
||||
# primary_ds:
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/demo_primary_ds
|
||||
# username: postgres
|
||||
# password: postgres
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
# replica_ds_0:
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/demo_replica_ds_0
|
||||
# username: postgres
|
||||
# password: postgres
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
# replica_ds_1:
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/demo_replica_ds_1
|
||||
# username: postgres
|
||||
# password: postgres
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
#
|
||||
#rules:
|
||||
#- !DB_DISCOVERY
|
||||
# dataSources:
|
||||
# pr_ds:
|
||||
# dataSourceNames:
|
||||
# - ds_0
|
||||
# - ds_1
|
||||
# - ds_2
|
||||
# discoveryTypeName: mgr
|
||||
# discoveryTypes:
|
||||
# mgr:
|
||||
# type: MGR
|
||||
# props:
|
||||
# groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
|
||||
# zkServerLists: 'localhost:2181'
|
||||
# keepAliveCron: '0/5 * * * * ?'
|
||||
|
||||
######################################################################################################
|
||||
#
|
||||
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
|
||||
#
|
||||
######################################################################################################
|
||||
|
||||
#schemaName: database_discovery_db
|
||||
#
|
||||
#dataSources:
|
||||
# ds_0:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/demo_primary_ds?serverTimezone=UTC&useSSL=false
|
||||
# username: root
|
||||
# password:
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
# ds_1:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_0?serverTimezone=UTC&useSSL=false
|
||||
# username: root
|
||||
# password:
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
# ds_2:
|
||||
# url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_1?serverTimezone=UTC&useSSL=false
|
||||
# username: root
|
||||
# password:
|
||||
# connectionTimeoutMilliseconds: 3000
|
||||
# idleTimeoutMilliseconds: 60000
|
||||
# maxLifetimeMilliseconds: 1800000
|
||||
# maxPoolSize: 50
|
||||
# minPoolSize: 1
|
||||
#
|
||||
#rules:
|
||||
#- !DB_DISCOVERY
|
||||
# dataSources:
|
||||
# pr_ds:
|
||||
# dataSourceNames:
|
||||
# - ds_0
|
||||
# - ds_1
|
||||
# - ds_2
|
||||
# discoveryTypeName: mgr
|
||||
# discoveryTypes:
|
||||
# mgr:
|
||||
# type: MGR
|
||||
# props:
|
||||
# groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
|
||||
# zkServerLists: 'localhost:2181'
|
||||
# keepAliveCron: '0/5 * * * * ?'
|
||||
Reference in New Issue
Block a user