Commit 065790a4 authored by 吴文龙's avatar 吴文龙

up

parent b4e4dc52
......@@ -15,8 +15,8 @@ LWM2M_TRANSPORT_DOCKER_NAME=tb-lwm2m-transport
SNMP_TRANSPORT_DOCKER_NAME=tb-snmp-transport
TB_VC_EXECUTOR_DOCKER_NAME=tb-vc-executor
TB_VERSION=3.4.4
TB_UI_VERSION=v3
TB_VERSION=3.6.2
TB_UI_VERSION=3.6.2
# Database used by ThingsBoard, can be either postgres (PostgreSQL) or hybrid (PostgreSQL for entities database and Cassandra for timeseries database).
# According to the database type corresponding docker service will be deployed (see docker-compose.postgres.yml, docker-compose.hybrid.yml for details).
......
......@@ -19,7 +19,7 @@ version: '2.2'
services:
postgres:
restart: always
image: "postgres:12"
image: "swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/postgres:12.3"
ports:
- "5432:5432"
environment:
......
......@@ -25,7 +25,7 @@ services:
- ./mysql/logs:/logs
iot-job:
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/xxl-job:v3
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/xxl-job:3.6.2
restart: always
ports:
- "8099:8080"
......@@ -35,23 +35,23 @@ services:
- mysql
iot-dbapi:
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/db-api:v3
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/db-api:3.6.2
ports:
- "8520:8520"
- "8523:8523"
- "8525:8525"
environment:
- DB_URL=jdbc:mysql://mysql:3306/iot_dbapi?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
- DB_USERNAME=root
- DB_PASSWORD=huansi@V3
- DB_DRIVER=com.mysql.cj.jdbc.Driver
- API_CONTEXT=api
- IOT_SERVER_HOST_URL=http://10.32.5.61
- SERVER_JWT_LOGIN_URL=http://10.32.5.61
restart: always
depends_on:
- mysql
iot-interface:
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/interface-service:v3
image: registry.cn-hangzhou.aliyuncs.com/hsyl_iot/interface-service:3.6.2
restart: always
ports:
- "8488:8080"
......@@ -59,16 +59,17 @@ services:
- tb-node.hybrid.env
environment:
- HTTP_BIND_PORT=8080
- KAFKA_K2_ENABLED=true
- KAFKA_K2_ENABLED=false
- KAFKA_K2_TOPIC_PRE=iot-v3
- KAFKA_K2_BOOTSTRAP_SERVERS=kafka-sync:9092
- HS_TIME_TASK_LOCAL=true
- HS_TIME_TASK_LOCAL=false
- SERVER_JWT_LOGIN_URL=http://tb-core1:8080
- IOT_DBAPI_URL=http://192.168.4.18:8520
- CACHE_TYPE=redis
- REDIS_HOST=redis
- REDIS_PORT=6379
- HS_GAODE_KEY=2505c76db7cb1455c89b7233f65638ba
- TASK_PUSH_MESSAGE_ENABLE=false
depends_on:
- iot-dbapi
......@@ -80,3 +81,22 @@ services:
depends_on:
- iot-dbapi
- iot-interface
iot-pep:
image: 47.110.145.204:8084/huansiyl/iot-v3/iot-platform-expansion-pkg:support_zhonghua_1.0.0
restart: always
ports:
- "8889:80"
volumes:
- ./iot-pep/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- iot-dbapi
- iot-interface
iot-board:
image: 47.110.145.204:8084/huansiyl/iot-v3/iot-dashboard:support_hengchuang_1.0.0
restart: always
ports:
- "8890:80"
volumes:
- ./iot-pep/nginx-board.conf:/etc/nginx/nginx.conf
......@@ -67,20 +67,25 @@ frontend http-in
http-request add-header "X-Forwarded-Proto" "http"
acl iot-interface_acl path_beg /iot/
acl iot-dbapi_acl path_beg /api/dbapi/
acl transport_http_acl path_beg /api/v1/
acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/
acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /static/widgets/
acl tb_api_acl path_beg /api/ /api_v1/ /swagger /webjars /v2/ /v3/ /static/rulenode/ /oauth2/ /login/oauth2/ /static/widgets/
acl iot_inteface_acl path_beg /iot/
acl dbapi_acl path_beg /api/bapi/
acl job_acl path_beg /xxl-job-admin/
acl pep_acl path_beg /iotExtention/
acl board_acl path_beg /iotDashboard/
redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true }
use_backend iot-interface-backend if iot-interface_acl
use_backend iot-dbapi-backend if iot-dbapi_acl
use_backend letsencrypt_http if letsencrypt_http_acl
use_backend tb-http-backend if transport_http_acl
use_backend tb-api-backend if tb_api_acl
use_backend iot-inteface-backend if iot_inteface_acl
use_backend dbapi-backend if dbapi_acl
use_backend job-backend if job_acl
use_backend pep-backend if pep_acl
use_backend board-backend if board_acl
default_backend tb-web-backend
......@@ -140,3 +145,23 @@ backend iot-dbapi-backend
server iot-dbapi iot-dbapi:8520 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
backend job-backend
balance leastconn
option tcp-check
option log-health-checks
server iot-job iot-job:8080 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
backend pep-backend
balance leastconn
option tcp-check
option log-health-checks
server iot-pep iot-pep:80 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
backend board-backend
balance leastconn
option tcp-check
option log-health-checks
server iot-board iot-board:80 check inter 5s resolvers docker_resolver resolve-prefer ipv4
http-request set-header X-Forwarded-Port %[dst_port]
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
client_max_body_size 500m;
server {
listen 80;
server_name 127.0.0.1;
# compression-webpack-plugin 配置
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
# 配置禁用 gzip 条件,支持正则,此处表示 ie6 及以下不启用 gzip(因为ie低版本不支持)
gzip_disable "MSIE [1-6]\.";
location ^~/iotDashboard {
alias /usr/share/nginx/html/iotDashboard/;
try_files $uri $uri/ /iotDashboard/index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
\ No newline at end of file
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
client_max_body_size 10m;
upstream hscloudApi {
server 10.32.5.61:80;
}
server {
listen 80;
server_name 127.0.0.1;
location ^~/iotExtention {
alias /usr/share/nginx/html/iotExtention/;
try_files $uri $uri/ /iotExtention/index.html;
}
# 代理配置,解决跨域问题
location /api/ {
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_pass http://hscloudApi/api/;
}
location /api/dbapi/ {
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_pass http://hscloudApi/api/dbapi/;
}
location /iot/ {
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_pass http://hscloudApi/iot/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
\ No newline at end of file
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