Commit f51f29d3 authored by 吴文龙's avatar 吴文龙

fix

parent e009e1fc
......@@ -62,7 +62,7 @@ listen_addresses = '*'
# defaults to 'localhost'; use '*' for all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 3000 # (change requires restart)
max_connections = 1000 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
# (change requires restart)
......@@ -119,7 +119,7 @@ max_connections = 3000 # (change requires restart)
# - Memory -
shared_buffers = 8GB # min 128kB
shared_buffers = 4GB # min 128kB
# (change requires restart)
#huge_pages = try # on, off, or try
# (change requires restart)
......@@ -128,8 +128,8 @@ max_prepared_transactions = 2000 # zero disables the feature
# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
work_mem = 8MB # min 64kB
maintenance_work_mem = 1GB # min 1MB
work_mem = 4MB # min 64kB
maintenance_work_mem = 256MB # min 1MB
autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB # min 100kB
#shared_memory_type = mmap # the default is the first option
......@@ -385,7 +385,7 @@ max_replication_slots = 10 # max number of replication slots
#min_parallel_table_scan_size = 8MB
#min_parallel_index_scan_size = 512kB
effective_cache_size = 16GB
effective_cache_size = 4GB
# - Genetic Query Optimizer -
......
......@@ -3,7 +3,7 @@ version: '3.9'
services:
zookeeper-sync:
image: 47.110.145.204:8084/huansiyl/debezium/zookeeper:1.9.5.Final
image: 47.110.145.204:8084/huansiyl/debezium/zookeeper:1.9.7.Final
ports:
- "2181:2181"
- "2888:2888"
......@@ -11,7 +11,7 @@ services:
restart: always
kafka-sync:
image: 47.110.145.204:8084/huansiyl/debezium/kafka:1.9.5.Final
image: 47.110.145.204:8084/huansiyl/debezium/kafka:1.9.7.Final
restart: always
ports:
- "9092"
......@@ -30,7 +30,7 @@ services:
- KAFKA_LOG_CLEANUP_POLICY=delete
connect:
image: 47.110.145.204:8084/huansiyl/debezium/connect:1.9.5.Final
image: 47.110.145.204:8084/huansiyl/debezium/connect:1.9.7.Final
restart: always
ports:
- "8083:8083"
......
version: '2.2'
services:
mysql:
image: mysql:8.0.26
container_name: mysql
command:
# MySQL8的密码验证方式默认是 caching_sha2_password,但是很多的连接工具还不支持该方式
# 就需要手动设置下mysql的密码认证方式为以前的 mysql_native_password 方式
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--lower-case-table-names=1 # 设置表名大小写不敏感
# docker的重启策略:在容器退出时总是重启容器,但是不考虑在Docker守护进程启动时就已经停止了的容器
restart: always
environment:
MYSQL_ROOT_PASSWORD: huansi@V3 # root用户的密码
MYSQL_USER: huansi # 创建新用户
MYSQL_PASSWORD: huansi.net # 新用户的密码
TZ: Asia/Shanghai
ports:
- 3306:3306
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf:/etc/mysql/conf.d
- ./mysql/logs:/logs
\ No newline at end of file
......@@ -40,21 +40,9 @@ services:
depends_on:
- postgres
- cassandra
tb-core2:
env_file:
- tb-node.hybrid.env
depends_on:
- postgres
- cassandra
tb-rule-engine1:
env_file:
- tb-node.hybrid.env
depends_on:
- postgres
- cassandra
tb-rule-engine2:
env_file:
- tb-node.hybrid.env
depends_on:
- postgres
- cassandra
......@@ -18,7 +18,7 @@ services:
MYSQL_PASSWORD: huansi.net # 新用户的密码
TZ: Asia/Shanghai
ports:
- 3306:3306
- 3309:3306
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf:/etc/mysql/conf.d
......
......@@ -36,38 +36,18 @@ services:
- queue-kafka.env
depends_on:
- kafka
tb-core2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-rule-engine1:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-rule-engine2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-mqtt-transport1:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-mqtt-transport2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-http-transport1:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-http-transport2:
env_file:
- queue-kafka.env
depends_on:
- kafka
......@@ -21,7 +21,7 @@ services:
restart: always
image: "postgres:12"
ports:
- "5432"
- "5432:5432"
environment:
POSTGRES_DB: hsiotdb
POSTGRES_PASSWORD: huansi.net@v3
......@@ -32,18 +32,8 @@ services:
- tb-node.postgres.env
depends_on:
- postgres
tb-core2:
env_file:
- tb-node.postgres.env
depends_on:
- postgres
tb-rule-engine1:
env_file:
- tb-node.postgres.env
depends_on:
- postgres
tb-rule-engine2:
env_file:
- tb-node.postgres.env
depends_on:
- postgres
......@@ -25,7 +25,7 @@ services:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
ALLOW_EMPTY_PASSWORD: "yes"
ports:
- '6380:6379'
- '6381:6379'
volumes:
- ./tb-node/redis-data:/bitnami/redis/data
......@@ -35,38 +35,18 @@ services:
- cache-redis.env
depends_on:
- redis
tb-core2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-rule-engine1:
env_file:
- cache-redis.env
depends_on:
- redis
tb-rule-engine2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-mqtt-transport1:
env_file:
- cache-redis.env
depends_on:
- redis
tb-mqtt-transport2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-http-transport1:
env_file:
- cache-redis.env
depends_on:
- redis
tb-http-transport2:
env_file:
- cache-redis.env
depends_on:
- redis
......@@ -20,42 +20,18 @@ services:
tb-core1:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-core2:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-rule-engine1:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-rule-engine2:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-coap-transport:
volumes:
- tb-coap-transport-log-volume:/var/log/tb-coap-transport
tb-lwm2m-transport:
volumes:
- tb-lwm2m-transport-log-volume:/var/log/tb-lwm2m-transport
tb-http-transport1:
volumes:
- tb-http-transport-log-volume:/var/log/tb-http-transport
tb-http-transport2:
volumes:
- tb-http-transport-log-volume:/var/log/tb-http-transport
tb-mqtt-transport1:
volumes:
- tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport
tb-mqtt-transport2:
volumes:
- tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport
tb-snmp-transport:
volumes:
- tb-snmp-transport-log-volume:/var/log/tb-snmp-transport
tb-vc-executor1:
volumes:
- tb-vc-executor-log-volume:/var/log/tb-vc-executor
tb-vc-executor2:
volumes:
- tb-vc-executor-log-volume:/var/log/tb-vc-executor
volumes:
tb-log-volume:
......@@ -73,9 +49,3 @@ volumes:
tb-mqtt-transport-log-volume:
external: true
name: ${TB_MQTT_TRANSPORT_LOG_VOLUME}
tb-snmp-transport-log-volume:
external: true
name: ${TB_SNMP_TRANSPORT_LOG_VOLUME}
tb-vc-executor-log-volume:
external: true
name: ${TB_VC_EXECUTOR_LOG_VOLUME}
......@@ -30,7 +30,7 @@ services:
tb-js-executor:
restart: always
image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}"
scale: 10
scale: 5
env_file:
- tb-js-executor.env
tb-core1:
......@@ -59,32 +59,6 @@ services:
- tb-js-executor
- tb-rule-engine1
- tb-rule-engine2
tb-core2:
restart: always
image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}"
ports:
- "8080"
- "7070"
logging:
driver: "json-file"
options:
max-size: "200m"
max-file: "30"
environment:
TB_SERVICE_ID: tb-core2
TB_SERVICE_TYPE: tb-core
EDGES_ENABLED: "true"
JAVA_OPTS: "${JAVA_OPTS}"
env_file:
- tb-node.env
volumes:
- ./tb-node/conf:/config
- ./tb-node/log:/var/log/thingsboard
depends_on:
- zookeeper
- tb-js-executor
- tb-rule-engine1
- tb-rule-engine2
tb-rule-engine1:
restart: always
image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}"
......@@ -107,28 +81,6 @@ services:
depends_on:
- zookeeper
- tb-js-executor
tb-rule-engine2:
restart: always
image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}"
ports:
- "8080"
logging:
driver: "json-file"
options:
max-size: "200m"
max-file: "30"
environment:
TB_SERVICE_ID: tb-rule-engine2
TB_SERVICE_TYPE: tb-rule-engine
JAVA_OPTS: "${JAVA_OPTS}"
env_file:
- tb-node.env
volumes:
- ./tb-node/conf:/config
- ./tb-node/log:/var/log/thingsboard
depends_on:
- zookeeper
- tb-js-executor
tb-mqtt-transport1:
restart: always
image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
......@@ -146,23 +98,6 @@ services:
- zookeeper
- tb-core1
- tb-core2
tb-mqtt-transport2:
restart: always
image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
ports:
- "1883"
environment:
TB_SERVICE_ID: tb-mqtt-transport2
JAVA_OPTS: "${JAVA_OPTS}"
env_file:
- tb-mqtt-transport.env
volumes:
- ./tb-transports/mqtt/conf:/config
- ./tb-transports/mqtt/log:/var/log/tb-mqtt-transport
depends_on:
- zookeeper
- tb-core1
- tb-core2
tb-http-transport1:
restart: always
image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
......@@ -180,23 +115,6 @@ services:
- zookeeper
- tb-core1
- tb-core2
tb-http-transport2:
restart: always
image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
ports:
- "8081"
environment:
TB_SERVICE_ID: tb-http-transport2
JAVA_OPTS: "${JAVA_OPTS}"
env_file:
- tb-http-transport.env
volumes:
- ./tb-transports/http/conf:/config
- ./tb-transports/http/log:/var/log/tb-http-transport
depends_on:
- zookeeper
- tb-core1
- tb-core2
tb-web-ui1:
restart: always
image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}"
......@@ -204,13 +122,6 @@ services:
- "8080"
env_file:
- tb-web-ui.env
tb-web-ui2:
restart: always
image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}"
ports:
- "8080"
env_file:
- tb-web-ui.env
haproxy:
restart: always
container_name: "${LOAD_BALANCER_NAME}"
......@@ -235,10 +146,6 @@ services:
FORCE_HTTPS_REDIRECT: "false"
links:
- tb-core1
- tb-core2
- tb-web-ui1
- tb-web-ui2
- tb-mqtt-transport1
- tb-mqtt-transport2
- tb-http-transport1
- tb-http-transport2
......@@ -47,7 +47,7 @@ listen mqtt-in
option tcplog
balance leastconn
server tbMqtt1 tb-mqtt-transport1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4
server tbMqtt2 tb-mqtt-transport2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4
# server tbMqtt2 tb-mqtt-transport2:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4
listen edges-rpc-in
bind *:${EDGES_RPC_PORT}
......@@ -58,7 +58,7 @@ listen edges-rpc-in
option tcplog
balance leastconn
server tbEdgesRpc1 tb-core1:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4
server tbEdgesRpc2 tb-core2:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4
# server tbEdgesRpc2 tb-core2:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4
frontend http-in
bind *:${HTTP_PORT} alpn h2,http/1.1
......@@ -108,7 +108,7 @@ backend tb-web-backend
option tcp-check
option log-health-checks
server tbWeb1 tb-web-ui1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
server tbWeb2 tb-web-ui2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
# server tbWeb2 tb-web-ui2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
backend tb-http-backend
......@@ -116,14 +116,14 @@ backend tb-http-backend
option tcp-check
option log-health-checks
server tbHttp1 tb-http-transport1:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4
server tbHttp2 tb-http-transport2:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4
# server tbHttp2 tb-http-transport2:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4
backend tb-api-backend
balance source
option tcp-check
option log-health-checks
server tbApi1 tb-core1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
server tbApi2 tb-core2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
# server tbApi2 tb-core2:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
backend iot-interface-backend
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment