Former-commit-id: 9b13deb3d4a62694052c65ae7d3f2be445e16f9d
TangShanKaiPing
wanggang 5 years ago
parent 2a4fc17b06
commit 7d32661160

@ -1,2 +1,5 @@
{
"AppSettings": {
"database": "sqlite"
}
}

@ -50,15 +50,15 @@
"register": "http://localhost/UserCenter/Account/Register"
},
"ConnectionStrings": {
"postgresql": "User ID=root;Host=localhost;Port=26257;Database=iotdb;CommandTimeout=120",
"postgresql": "User ID=root;Host=localhost;Port=26257;Database=iotcenter;CommandTimeout=120",
"sqlite": "Data Source=iotcenter.db",
"mysql": "Server=127.0.0.1;Port=3306;Database=iotcenter;Uid=root;Pwd=root;",
"redis": "127.0.0.1:6379,allowAdmin=true",
"srs": "http://localhost:1985"
},
"AppSettings": {
"database": "sqlite",
"database": "mysql",
"cache": "memory",
//"upload": "http://10.10.24.104:8180/group1/upload"
"upload": ""
}
}

@ -1,2 +1,5 @@
{
"AppSettings": {
"database": "sqlite"
}
}

@ -45,8 +45,8 @@
"redis": "127.0.0.1:6379,allowAdmin=true"
},
"AppSettings": {
"database": "sqlite",
"database": "mysql",
"cache": "memory",
"upload": "http://10.10.24.104:8180/group1/upload"
"upload": ""
}
}

@ -5,6 +5,8 @@ rd /q/s "./dist/"
echo d|xcopy "./src" "./dist/" /s /e /y /f
dotnet publish ../projects/WebMvc/WebMvc.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/WebMVC
dotnet publish ../projects/WebSPA/WebSPA.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/WebSPA
dotnet publish ../projects/UserCenter/UserCenter.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/UserCenter
dotnet publish ../projects/IoTCenter/IoTCenter.csproj -c Release -r linux-x64 -o ../publish/dist/linux-x64/publish/apps/IoTCenter
dotnet publish ../projects/IoTNode/IoTNode.csproj -c Release -r linux-arm64 -o ../publish/dist/linux-arm64/publish/apps/IoTNode

@ -23,11 +23,11 @@ stats {
disk sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
transcode live {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
transcode live {
enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine snapshot {
enabled on;
enabled on;
iformat flv;
vfilter {
vf fps=1;
@ -56,14 +56,10 @@ vhost __defaultVhost__ {
dvr {
enabled on;
dvr_apply none;
dvr_path ./objs/nginx/html/[app].[stream].[timestamp].flv;;
dvr_plan session;
dvr_duration 300;
dvr_wait_keyframe on;
time_jitter full;
dvr_path ./objs/nginx/html/video/[app].[stream].[timestamp].mp4;
}
http_hooks {
enabled on;
on_dvr http://localhost/IoTCenter/App/OnDvr;
on_dvr http://localhost/IoTCenter/api/v1/Srs/OnDvr;
}
}

@ -8,6 +8,8 @@ mv /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bk
mv /root/publish/supervisord.conf /etc/supervisor/supervisord.conf
chmod 777 /root/publish/apps/UserCenter/UserCenter
chmod 777 /root/publish/apps/IoTCenter/IoTCenter
chmod 777 /root/publish/apps/WebMVC/WebMVC
chmod 777 /root/publish/apps/WebSPA/WebSPA
chmod 777 /root/publish/apps/srs/objs/srs
chmod 777 /root/publish/apps/seaweedfs/weed
chmod 777 /root/publish/apps/srs/objs/ffmpeg/bin/ffmpeg
service supervisor restart

@ -1,13 +1,19 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@ -16,35 +22,52 @@ http {
keepalive_timeout 65;
upstream go-fastdfs {
server 10.10.24.104:8180;
ip_hash;
}
server {
listen 0.0.0.0:80;
server_name localhost;
location ^~ /live/ {
proxy_pass http://localhost:8080/live/;
location / {
#proxy_set_header Host $host:$server_port;
if ($http_user_agent ~* "(mobile|android|ipad|iphone|ipod|tablet)") {
proxy_pass http://localhost:5002;
break;
}
proxy_pass http://localhost:5001/;
}
location ^~ /video/ {
proxy_pass http://localhost:8080/;
}
location ^~ /dfs/ {
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://go-fastdfs/;
}
location ^~ /UserCenter/ {
proxy_pass http://localhost:8010/;
#add_header 'Access-Control-Allow-Origin' '*';
#add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
#add_header 'Access-Control-Allow-Headers' 'Content-Type';
location ^~ /live/ {
proxy_pass http://localhost:8080/live/;
}
location ^~ /video/ {
proxy_pass http://localhost:8080/video/;
}
location ^~ /UserCenter/ {
proxy_pass http://localhost:8010/UserCenter/;
}
location ^~ /IoTCenter/ {
proxy_pass http://localhost:8011/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
proxy_pass http://localhost:8011/IoTCenter/;
}
location ^~ /IoTCenter/App/ {
proxy_pass http://localhost:8011/App/;
location ^~ /IoTCenter/hub {
proxy_pass http://localhost:8011/IoTCenter/hub;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
error_page 500 502 503 504 /50x.html;
@ -52,6 +75,4 @@ http {
root html;
}
}
}
}

@ -0,0 +1,8 @@
[program:webmvc]
command=/root/publish/apps/WebMVC/WebMvc
directory=/root/publish/apps/WebMVC/
autostart=true
autorestart=true
user=root
stdout_logfile=/root/publish/logs/webmvc.log
stderr_logfile=/root/publish/logs/webmvc.err

@ -0,0 +1,8 @@
[program:webspa]
command=/root/publish/apps/WebSPA/WebSPA
directory=/root/publish/apps/WebSPA/
autostart=true
autorestart=true
user=root
stdout_logfile=/root/publish/logs/webspa.log
stderr_logfile=/root/publish/logs/webspa.err
Loading…
Cancel
Save