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" "register": "http://localhost/UserCenter/Account/Register"
}, },
"ConnectionStrings": { "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", "sqlite": "Data Source=iotcenter.db",
"mysql": "Server=127.0.0.1;Port=3306;Database=iotcenter;Uid=root;Pwd=root;", "mysql": "Server=127.0.0.1;Port=3306;Database=iotcenter;Uid=root;Pwd=root;",
"redis": "127.0.0.1:6379,allowAdmin=true", "redis": "127.0.0.1:6379,allowAdmin=true",
"srs": "http://localhost:1985" "srs": "http://localhost:1985"
}, },
"AppSettings": { "AppSettings": {
"database": "sqlite", "database": "mysql",
"cache": "memory", "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" "redis": "127.0.0.1:6379,allowAdmin=true"
}, },
"AppSettings": { "AppSettings": {
"database": "sqlite", "database": "mysql",
"cache": "memory", "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 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/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/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 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; disk sda sdb xvda xvdb;
} }
vhost __defaultVhost__ { vhost __defaultVhost__ {
transcode live { transcode live {
enabled on; enabled on;
ffmpeg ./objs/ffmpeg/bin/ffmpeg; ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine snapshot { engine snapshot {
enabled on; enabled on;
iformat flv; iformat flv;
vfilter { vfilter {
vf fps=1; vf fps=1;
@ -56,14 +56,10 @@ vhost __defaultVhost__ {
dvr { dvr {
enabled on; enabled on;
dvr_apply none; dvr_apply none;
dvr_path ./objs/nginx/html/[app].[stream].[timestamp].flv;; dvr_path ./objs/nginx/html/video/[app].[stream].[timestamp].mp4;
dvr_plan session;
dvr_duration 300;
dvr_wait_keyframe on;
time_jitter full;
} }
http_hooks { http_hooks {
enabled on; 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 mv /root/publish/supervisord.conf /etc/supervisor/supervisord.conf
chmod 777 /root/publish/apps/UserCenter/UserCenter chmod 777 /root/publish/apps/UserCenter/UserCenter
chmod 777 /root/publish/apps/IoTCenter/IoTCenter 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/srs/objs/srs
chmod 777 /root/publish/apps/seaweedfs/weed chmod 777 /root/publish/apps/srs/objs/ffmpeg/bin/ffmpeg
service supervisor restart service supervisor restart

@ -1,13 +1,19 @@
user www-data;
worker_processes auto; #user nobody;
pid /run/nginx.pid; worker_processes 1;
include /etc/nginx/modules-enabled/*.conf;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events { events {
worker_connections 768; worker_connections 1024;
# multi_accept on;
} }
http { http {
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
@ -16,35 +22,52 @@ http {
keepalive_timeout 65; keepalive_timeout 65;
upstream go-fastdfs {
server 10.10.24.104:8180;
ip_hash;
}
server { server {
listen 0.0.0.0:80; listen 0.0.0.0:80;
server_name localhost; server_name localhost;
location ^~ /live/ { location / {
proxy_pass http://localhost:8080/live/; #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/ { location ^~ /dfs/ {
proxy_pass http://localhost:8080/; 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/ { location ^~ /live/ {
proxy_pass http://localhost:8010/; proxy_pass http://localhost:8080/live/;
#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 ^~ /video/ {
proxy_pass http://localhost:8080/video/;
}
location ^~ /UserCenter/ {
proxy_pass http://localhost:8010/UserCenter/;
} }
location ^~ /IoTCenter/ { location ^~ /IoTCenter/ {
proxy_pass http://localhost:8011/; proxy_pass http://localhost:8011/IoTCenter/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
} }
location ^~ /IoTCenter/App/ { location ^~ /IoTCenter/hub {
proxy_pass http://localhost:8011/App/; 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; error_page 500 502 503 504 /50x.html;
@ -52,6 +75,4 @@ http {
root html; 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