update 修改配置和脚本

master
管理员 4 months ago
parent f5a7b75f0a
commit 5d5063a291

@ -49,6 +49,44 @@ logging:
--- # 临时文件存储位置 避免临时文件被系统清理报错 --- # 临时文件存储位置 避免临时文件被系统清理报错
spring.servlet.multipart.location: /tmp/${ruoyi.name} spring.servlet.multipart.location: /tmp/${ruoyi.name}
--- # mqtt配置
spring:
mqtt:
enabled: true # 是否激活,默认: false
default-config: default # 默认配置项名称, 默认: default
configs:
default:
enabled: true # 配置项是否激活,默认: true
url: tcp://192.168.3.222:1883 # mqtt服务器主地址
# urls: # mqtt服务器集群地址(可选)
# - tcp://192.168.3.222:1883
client-id: ${ruoyi.name}-client
username: ${ruoyi.name}
password: ${ruoyi.name}1415926
sends:
test:
topic: ${ruoyi.name}/test/{0}
qos: 0
retained: false
subscribes:
- topic: ${ruoyi.name}/test/#
qos: 0
rmi:
enabled: false
provider: true
consumer: true
topic:
topic: ${ruoyi.name}/rmi
qos: 0
retained: false
timeout: 500
--- # 数据源配置 --- # 数据源配置
spring: spring:

@ -11,6 +11,26 @@ networks:
services: services:
# mqtt服务
mqtt:
container_name: mqtt
restart: always
image: registry.cn-hangzhou.aliyuncs.com/awl/emqx:5.6.1
ports:
- "1883:1883"
- "8083:8083"
# - "8084:8084"
# - "8883:8883"
- "18083:18083"
volumes:
- ./mqtt/configs/:/opt/emqx/data/configs/:rw
- ./mqtt/log/:/opt/emqx/log/:rw
environment:
TZ: Asia/Shanghai
privileged: true
networks:
- base2024-network
# mongodb # mongodb
mongodb: mongodb:
container_name: mongodb container_name: mongodb

@ -0,0 +1,51 @@
authentication = [
{
backend = http
body {
password = "${password}"
username = "${username}"
}
connect_timeout = 15s
enable_pipelining = 100
headers {content-type = "application/json"}
mechanism = password_based
method = post
pool_size = 8
request_timeout = 5s
ssl {enable = false, verify = verify_peer}
url = "http://server1:8080/emqx-login"
}
]
mqtt {
await_rel_timeout = 300s
exclusive_subscription = false
idle_timeout = 15s
ignore_loop_deliver = false
keepalive_multiplier = 1.5
max_awaiting_rel = 100
max_clientid_len = 65535
max_inflight = 32
max_mqueue_len = 1000
max_packet_size = 256MB
max_qos_allowed = 2
max_subscriptions = infinity
max_topic_alias = 65535
max_topic_levels = 128
message_expiry_interval = infinity
mqueue_default_priority = lowest
mqueue_priorities = disabled
mqueue_store_qos0 = true
peer_cert_as_clientid = disabled
peer_cert_as_username = disabled
response_information = ""
retain_available = true
retry_interval = 30s
server_keepalive = disabled
session_expiry_interval = 2h
shared_subscription = true
shared_subscription_strategy = round_robin
strict_mode = false
upgrade_qos = false
use_username_as_clientid = false
wildcard_subscription = true
}

@ -0,0 +1 @@
# emqx日志目录

@ -95,6 +95,21 @@ http {
proxy_pass http://server/; proxy_pass http://server/;
} }
location /mqtt {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# SSE 连接时的超时时间1小时
proxy_read_timeout 3600s;
# 取消缓冲
proxy_buffering off;
proxy_pass http://mqtt:8083;
}
# 反向代理minio需要创建一个files的存储桶 # 反向代理minio需要创建一个files的存储桶
location /files/ { location /files/ {

Loading…
Cancel
Save