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

fix

parent e009e1fc
...@@ -62,7 +62,7 @@ listen_addresses = '*' ...@@ -62,7 +62,7 @@ listen_addresses = '*'
# defaults to 'localhost'; use '*' for all # defaults to 'localhost'; use '*' for all
# (change requires restart) # (change requires restart)
#port = 5432 # (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) #superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories #unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
# (change requires restart) # (change requires restart)
...@@ -119,7 +119,7 @@ max_connections = 3000 # (change requires restart) ...@@ -119,7 +119,7 @@ max_connections = 3000 # (change requires restart)
# - Memory - # - Memory -
shared_buffers = 8GB # min 128kB shared_buffers = 4GB # min 128kB
# (change requires restart) # (change requires restart)
#huge_pages = try # on, off, or try #huge_pages = try # on, off, or try
# (change requires restart) # (change requires restart)
...@@ -128,8 +128,8 @@ max_prepared_transactions = 2000 # zero disables the feature ...@@ -128,8 +128,8 @@ max_prepared_transactions = 2000 # zero disables the feature
# (change requires restart) # (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless # Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions. # you actively intend to use prepared transactions.
work_mem = 8MB # min 64kB work_mem = 4MB # min 64kB
maintenance_work_mem = 1GB # min 1MB maintenance_work_mem = 256MB # min 1MB
autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
#max_stack_depth = 2MB # min 100kB #max_stack_depth = 2MB # min 100kB
#shared_memory_type = mmap # the default is the first option #shared_memory_type = mmap # the default is the first option
...@@ -385,7 +385,7 @@ max_replication_slots = 10 # max number of replication slots ...@@ -385,7 +385,7 @@ max_replication_slots = 10 # max number of replication slots
#min_parallel_table_scan_size = 8MB #min_parallel_table_scan_size = 8MB
#min_parallel_index_scan_size = 512kB #min_parallel_index_scan_size = 512kB
effective_cache_size = 16GB effective_cache_size = 4GB
# - Genetic Query Optimizer - # - Genetic Query Optimizer -
......
...@@ -3,7 +3,7 @@ version: '3.9' ...@@ -3,7 +3,7 @@ version: '3.9'
services: services:
zookeeper-sync: 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: ports:
- "2181:2181" - "2181:2181"
- "2888:2888" - "2888:2888"
...@@ -11,7 +11,7 @@ services: ...@@ -11,7 +11,7 @@ services:
restart: always restart: always
kafka-sync: 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 restart: always
ports: ports:
- "9092" - "9092"
...@@ -30,7 +30,7 @@ services: ...@@ -30,7 +30,7 @@ services:
- KAFKA_LOG_CLEANUP_POLICY=delete - KAFKA_LOG_CLEANUP_POLICY=delete
connect: 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 restart: always
ports: ports:
- "8083:8083" - "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: ...@@ -40,21 +40,9 @@ services:
depends_on: depends_on:
- postgres - postgres
- cassandra - cassandra
tb-core2:
env_file:
- tb-node.hybrid.env
depends_on:
- postgres
- cassandra
tb-rule-engine1: tb-rule-engine1:
env_file: env_file:
- tb-node.hybrid.env - tb-node.hybrid.env
depends_on: depends_on:
- postgres - postgres
- cassandra - cassandra
tb-rule-engine2:
env_file:
- tb-node.hybrid.env
depends_on:
- postgres
- cassandra
...@@ -18,7 +18,7 @@ services: ...@@ -18,7 +18,7 @@ services:
MYSQL_PASSWORD: huansi.net # 新用户的密码 MYSQL_PASSWORD: huansi.net # 新用户的密码
TZ: Asia/Shanghai TZ: Asia/Shanghai
ports: ports:
- 3306:3306 - 3309:3306
volumes: volumes:
- ./mysql/data:/var/lib/mysql - ./mysql/data:/var/lib/mysql
- ./mysql/conf:/etc/mysql/conf.d - ./mysql/conf:/etc/mysql/conf.d
......
...@@ -36,38 +36,18 @@ services: ...@@ -36,38 +36,18 @@ services:
- queue-kafka.env - queue-kafka.env
depends_on: depends_on:
- kafka - kafka
tb-core2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-rule-engine1: tb-rule-engine1:
env_file: env_file:
- queue-kafka.env - queue-kafka.env
depends_on: depends_on:
- kafka - kafka
tb-rule-engine2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-mqtt-transport1: tb-mqtt-transport1:
env_file: env_file:
- queue-kafka.env - queue-kafka.env
depends_on: depends_on:
- kafka - kafka
tb-mqtt-transport2:
env_file:
- queue-kafka.env
depends_on:
- kafka
tb-http-transport1: tb-http-transport1:
env_file: env_file:
- queue-kafka.env - queue-kafka.env
depends_on: depends_on:
- kafka - kafka
tb-http-transport2:
env_file:
- queue-kafka.env
depends_on:
- kafka
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
restart: always restart: always
image: "postgres:12" image: "postgres:12"
ports: ports:
- "5432" - "5432:5432"
environment: environment:
POSTGRES_DB: hsiotdb POSTGRES_DB: hsiotdb
POSTGRES_PASSWORD: huansi.net@v3 POSTGRES_PASSWORD: huansi.net@v3
...@@ -32,18 +32,8 @@ services: ...@@ -32,18 +32,8 @@ services:
- tb-node.postgres.env - tb-node.postgres.env
depends_on: depends_on:
- postgres - postgres
tb-core2:
env_file:
- tb-node.postgres.env
depends_on:
- postgres
tb-rule-engine1: tb-rule-engine1:
env_file: env_file:
- tb-node.postgres.env - tb-node.postgres.env
depends_on: depends_on:
- postgres - postgres
tb-rule-engine2:
env_file:
- tb-node.postgres.env
depends_on:
- postgres
...@@ -25,7 +25,7 @@ services: ...@@ -25,7 +25,7 @@ services:
# ALLOW_EMPTY_PASSWORD is recommended only for development. # ALLOW_EMPTY_PASSWORD is recommended only for development.
ALLOW_EMPTY_PASSWORD: "yes" ALLOW_EMPTY_PASSWORD: "yes"
ports: ports:
- '6380:6379' - '6381:6379'
volumes: volumes:
- ./tb-node/redis-data:/bitnami/redis/data - ./tb-node/redis-data:/bitnami/redis/data
...@@ -35,38 +35,18 @@ services: ...@@ -35,38 +35,18 @@ services:
- cache-redis.env - cache-redis.env
depends_on: depends_on:
- redis - redis
tb-core2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-rule-engine1: tb-rule-engine1:
env_file: env_file:
- cache-redis.env - cache-redis.env
depends_on: depends_on:
- redis - redis
tb-rule-engine2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-mqtt-transport1: tb-mqtt-transport1:
env_file: env_file:
- cache-redis.env - cache-redis.env
depends_on: depends_on:
- redis - redis
tb-mqtt-transport2:
env_file:
- cache-redis.env
depends_on:
- redis
tb-http-transport1: tb-http-transport1:
env_file: env_file:
- cache-redis.env - cache-redis.env
depends_on: depends_on:
- redis - redis
tb-http-transport2:
env_file:
- cache-redis.env
depends_on:
- redis
...@@ -20,42 +20,18 @@ services: ...@@ -20,42 +20,18 @@ services:
tb-core1: tb-core1:
volumes: volumes:
- tb-log-volume:/var/log/thingsboard - tb-log-volume:/var/log/thingsboard
tb-core2:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-rule-engine1: tb-rule-engine1:
volumes: volumes:
- tb-log-volume:/var/log/thingsboard - tb-log-volume:/var/log/thingsboard
tb-rule-engine2:
volumes:
- tb-log-volume:/var/log/thingsboard
tb-coap-transport: tb-coap-transport:
volumes: volumes:
- tb-coap-transport-log-volume:/var/log/tb-coap-transport - 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: tb-http-transport1:
volumes: volumes:
- tb-http-transport-log-volume:/var/log/tb-http-transport - 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: tb-mqtt-transport1:
volumes: volumes:
- tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport - 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: volumes:
tb-log-volume: tb-log-volume:
...@@ -73,9 +49,3 @@ volumes: ...@@ -73,9 +49,3 @@ volumes:
tb-mqtt-transport-log-volume: tb-mqtt-transport-log-volume:
external: true external: true
name: ${TB_MQTT_TRANSPORT_LOG_VOLUME} 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: ...@@ -30,7 +30,7 @@ services:
tb-js-executor: tb-js-executor:
restart: always restart: always
image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${JS_EXECUTOR_DOCKER_NAME}:${TB_VERSION}"
scale: 10 scale: 5
env_file: env_file:
- tb-js-executor.env - tb-js-executor.env
tb-core1: tb-core1:
...@@ -59,32 +59,6 @@ services: ...@@ -59,32 +59,6 @@ services:
- tb-js-executor - tb-js-executor
- tb-rule-engine1 - tb-rule-engine1
- tb-rule-engine2 - 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: tb-rule-engine1:
restart: always restart: always
image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${TB_NODE_DOCKER_NAME}:${TB_VERSION}"
...@@ -107,28 +81,6 @@ services: ...@@ -107,28 +81,6 @@ services:
depends_on: depends_on:
- zookeeper - zookeeper
- tb-js-executor - 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: tb-mqtt-transport1:
restart: always restart: always
image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${MQTT_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
...@@ -146,23 +98,6 @@ services: ...@@ -146,23 +98,6 @@ services:
- zookeeper - zookeeper
- tb-core1 - tb-core1
- tb-core2 - 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: tb-http-transport1:
restart: always restart: always
image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${HTTP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
...@@ -180,23 +115,6 @@ services: ...@@ -180,23 +115,6 @@ services:
- zookeeper - zookeeper
- tb-core1 - tb-core1
- tb-core2 - 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: tb-web-ui1:
restart: always restart: always
image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}" image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}"
...@@ -204,13 +122,6 @@ services: ...@@ -204,13 +122,6 @@ services:
- "8080" - "8080"
env_file: env_file:
- tb-web-ui.env - 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: haproxy:
restart: always restart: always
container_name: "${LOAD_BALANCER_NAME}" container_name: "${LOAD_BALANCER_NAME}"
...@@ -235,10 +146,6 @@ services: ...@@ -235,10 +146,6 @@ services:
FORCE_HTTPS_REDIRECT: "false" FORCE_HTTPS_REDIRECT: "false"
links: links:
- tb-core1 - tb-core1
- tb-core2
- tb-web-ui1 - tb-web-ui1
- tb-web-ui2
- tb-mqtt-transport1 - tb-mqtt-transport1
- tb-mqtt-transport2
- tb-http-transport1 - tb-http-transport1
- tb-http-transport2
...@@ -47,7 +47,7 @@ listen mqtt-in ...@@ -47,7 +47,7 @@ listen mqtt-in
option tcplog option tcplog
balance leastconn balance leastconn
server tbMqtt1 tb-mqtt-transport1:1883 check inter 5s resolvers docker_resolver resolve-prefer ipv4 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 listen edges-rpc-in
bind *:${EDGES_RPC_PORT} bind *:${EDGES_RPC_PORT}
...@@ -58,7 +58,7 @@ listen edges-rpc-in ...@@ -58,7 +58,7 @@ listen edges-rpc-in
option tcplog option tcplog
balance leastconn balance leastconn
server tbEdgesRpc1 tb-core1:7070 check inter 5s resolvers docker_resolver resolve-prefer ipv4 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 frontend http-in
bind *:${HTTP_PORT} alpn h2,http/1.1 bind *:${HTTP_PORT} alpn h2,http/1.1
...@@ -108,7 +108,7 @@ backend tb-web-backend ...@@ -108,7 +108,7 @@ backend tb-web-backend
option tcp-check option tcp-check
option log-health-checks option log-health-checks
server tbWeb1 tb-web-ui1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 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] http-request set-header X-Forwarded-Port %[dst_port]
backend tb-http-backend backend tb-http-backend
...@@ -116,14 +116,14 @@ backend tb-http-backend ...@@ -116,14 +116,14 @@ backend tb-http-backend
option tcp-check option tcp-check
option log-health-checks option log-health-checks
server tbHttp1 tb-http-transport1:8081 check inter 5s resolvers docker_resolver resolve-prefer ipv4 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 backend tb-api-backend
balance source balance source
option tcp-check option tcp-check
option log-health-checks option log-health-checks
server tbApi1 tb-core1:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4 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] http-request set-header X-Forwarded-Port %[dst_port]
backend iot-interface-backend 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