Commit 0ad0621f authored by 吴文龙's avatar 吴文龙

增加大屏部署

parent e4464ad6
...@@ -10,6 +10,11 @@ services: ...@@ -10,6 +10,11 @@ services:
- DB_DRIVER=com.mysql.cj.jdbc.Driver - DB_DRIVER=com.mysql.cj.jdbc.Driver
- IOT_TWINBORN_FILE_LOCATION=/upload - IOT_TWINBORN_FILE_LOCATION=/upload
- IOT_CONFIG_DATASOURCE=classpath:ds.xml - IOT_CONFIG_DATASOURCE=classpath:ds.xml
- IOT_V3_DATASOURCE_URL=jdbc:postgresql://192.168.10.23:32910/hsiotdb
- IOT_V3_DATASOURCE_PASSWORD=huansi.net@v3
- IOT_V3_DATASOURCE_USERNAME=postgres
- IOT_V3_REDIS_HOST=192.168.10.23
- IOT_V3_REDIS_PORT=6380
volumes: volumes:
- ./upload:/upload - ./upload:/upload
ports: ports:
......
...@@ -5,4 +5,13 @@ services: ...@@ -5,4 +5,13 @@ services:
container_name: htwin-web container_name: htwin-web
ports: ports:
- "8521:80" - "8521:80"
restart: always
sdhl-dashboard:
image: 47.110.145.204:8084/huansiyl/sdhl-iot/hengli-dashboard:dev
container_name: sdhl-dashboard
ports:
- "8525:80"
volumes:
- ./web-conf/nginx.conf:/etc/nginx/nginx.conf
restart: always restart: always
\ No newline at end of file
...@@ -3,51 +3,53 @@ worker_processes 1; ...@@ -3,51 +3,53 @@ worker_processes 1;
error_log /var/log/nginx/error.log warn; error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main; access_log /var/log/nginx/access.log main;
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
client_max_body_size 10m; client_max_body_size 500m;
upstream hscloudApi {
server htwin-dbapi:8520;
}
server { server {
listen 80; listen 80;
server_name 127.0.0.1; server_name 127.0.0.1;
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
# 代理配置,解决跨域问题 # compression-webpack-plugin 配置
location /api/ { gzip on;
proxy_set_header Host $host; gzip_min_length 1k;
proxy_set_header X-Real-IP $remote_addr; gzip_comp_level 9;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 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;
proxy_pass http://hscloudApi/; gzip_vary on;
} # 配置禁用 gzip 条件,支持正则,此处表示 ie6 及以下不启用 gzip(因为ie低版本不支持)
location /test-api/ { gzip_disable "MSIE [1-6]\.";
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/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
} index index.html;
try_files $uri $uri/ /index.html;
}
# 代理配置,解决跨域问题
location /prod/ {
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://htwin-dbapi:8520/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
} }
} }
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