From e7657d8aabaa40b0a1797f0ebccf55e7926ef011 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Wed, 20 May 2020 16:26:23 +0800
Subject: [PATCH] update
Former-commit-id: 067f3ccc031b59e045d930e6c4b2b59e2500a574
---
projects/WebSPA/wwwroot/index.html | 4 +--
.../publish/docker-compose.override.yml | 19 ++++++++++-
.../src/linux-x64/publish/docker-compose.yml | 33 ++++++++++++++-----
.../src/linux-x64/publish/nginx/nginx.conf | 4 +--
.../src/linux-x64/publish/srs/conf/srs.conf | 6 ++--
5 files changed, 49 insertions(+), 17 deletions(-)
diff --git a/projects/WebSPA/wwwroot/index.html b/projects/WebSPA/wwwroot/index.html
index 7bb82798..306f2d91 100644
--- a/projects/WebSPA/wwwroot/index.html
+++ b/projects/WebSPA/wwwroot/index.html
@@ -10,7 +10,7 @@
-
物联管控
+ 物联管控
@@ -24,7 +24,7 @@
diff --git a/publish/src/linux-x64/publish/docker-compose.override.yml b/publish/src/linux-x64/publish/docker-compose.override.yml
index 21b92800..83260574 100644
--- a/publish/src/linux-x64/publish/docker-compose.override.yml
+++ b/publish/src/linux-x64/publish/docker-compose.override.yml
@@ -1 +1,18 @@
-version: "3.8"
\ No newline at end of file
+version: "3.8"
+services:
+ webmvc:
+ image: nginx:1.18
+ restart: always
+ environment:
+ TZ: "Asia/Shanghai"
+ volumes:
+ - ../../../../projects/WebMVC/wwwroot:/usr/share/nginx/html
+ - ./log/webmvc:/var/log/nginx
+ webspa:
+ image: nginx:1.18
+ restart: always
+ environment:
+ TZ: "Asia/Shanghai"
+ volumes:
+ - ../../../../projects/WebSPA/wwwroot:/usr/share/nginx/html
+ - ./log/webspa:/var/log/nginx
\ No newline at end of file
diff --git a/publish/src/linux-x64/publish/docker-compose.yml b/publish/src/linux-x64/publish/docker-compose.yml
index 8e5bf17a..7343609a 100644
--- a/publish/src/linux-x64/publish/docker-compose.yml
+++ b/publish/src/linux-x64/publish/docker-compose.yml
@@ -29,7 +29,7 @@ services:
volumes:
- ./influxdb:/var/lib/influxdb
srs:
- image: ossrs/srs:v3.0-b4
+ image: ossrs/srs:v4.0.23
environment:
TZ: "Asia/Shanghai"
restart: always
@@ -38,15 +38,16 @@ services:
- 1985:1985
volumes:
- ./srs/conf/srs.conf:/usr/local/srs/conf/srs.conf
+ - ./log/srs:/usr/local/srs/objs/log
- ./srs/objs/nginx/html/video:/usr/local/srs/objs/nginx/html/video
usercenter:
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.1-focal
restart: always
environment:
TZ: "Asia/Shanghai"
+ command: bash -c "chmod +x /UserCenter/UserCenter && cd /UserCenter && ./UserCenter"
depends_on:
- mysql
- command: bash -c "chmod +x /UserCenter/UserCenter && cd /UserCenter && ./UserCenter"
volumes:
- ./UserCenter:/UserCenter
iotcenter:
@@ -54,10 +55,9 @@ services:
restart: always
environment:
TZ: "Asia/Shanghai"
+ command: bash -c "chmod +x /IoTCenter/IoTCenter && cd /IoTCenter && ./IoTCenter"
depends_on:
- mysql
- - influxdb
- command: bash -c "chmod +x /IoTCenter/IoTCenter && cd /IoTCenter && ./IoTCenter"
volumes:
- ./IotCenter:/IoTCenter
jobserver:
@@ -65,25 +65,40 @@ services:
restart: always
environment:
TZ: "Asia/Shanghai"
+ command: bash -c "sleep 3 && chmod +x /JobServer/JobServer && cd /JobServer && ./JobServer"
depends_on:
- mysql
- command: bash -c "sleep 3 && chmod +x /JobServer/JobServer && cd /JobServer && ./JobServer"
volumes:
- ./JobServer:/JobServer
- nginx:
+ webmvc:
+ image: nginx:1.18
+ restart: always
+ environment:
+ TZ: "Asia/Shanghai"
+ volumes:
+ - ./WebMVC/wwwroot:/usr/share/nginx/html
+ - ./log/webmvc:/var/log/nginx
+ webspa:
+ image: nginx:1.18
+ restart: always
+ environment:
+ TZ: "Asia/Shanghai"
+ volumes:
+ - ./WebSPA/wwwroot:/usr/share/nginx/html
+ - ./log/webspa:/var/log/nginx
+ nginx:
image: nginx:1.18
restart: always
- hostname: nginx
environment:
TZ: "Asia/Shanghai"
ports:
- 80:80
- 443:443
depends_on:
- - srs
+ - webmvc
+ - webspa
- usercenter
- iotcenter
- - jobserver
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/edusoa.key:/etc/nginx/edusoa.key
diff --git a/publish/src/linux-x64/publish/nginx/nginx.conf b/publish/src/linux-x64/publish/nginx/nginx.conf
index 486fe163..9fb25577 100644
--- a/publish/src/linux-x64/publish/nginx/nginx.conf
+++ b/publish/src/linux-x64/publish/nginx/nginx.conf
@@ -46,10 +46,10 @@ http {
location / {
if ($http_user_agent ~* "(mobile|android|ipad|iphone|ipod|tablet)") {
- proxy_pass http://localhost:5002;
+ proxy_pass http://webspa;
break;
}
- proxy_pass http://localhost:5001/;
+ proxy_pass http://webmvc/;
}
location ^~ /dfs/ {
diff --git a/publish/src/linux-x64/publish/srs/conf/srs.conf b/publish/src/linux-x64/publish/srs/conf/srs.conf
index c9aceff8..6b31ae33 100644
--- a/publish/src/linux-x64/publish/srs/conf/srs.conf
+++ b/publish/src/linux-x64/publish/srs/conf/srs.conf
@@ -1,8 +1,8 @@
listen 1935;
-daemon off;
max_connections 1000;
srs_log_tank file;
-srs_log_file ./objs/srs.log;
+srs_log_file ./objs/log/srs.log;
+daemon off;
http_api {
enabled on;
listen 1985;
@@ -24,7 +24,7 @@ stats {
}
vhost __defaultVhost__ {
transcode live {
- enabled on;
+ enabled off;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine snapshot {
enabled on;