Former-commit-id: 4632f4f88cad48bd67262d21105b07855d699a19
Former-commit-id: 7f1d134aeedebd7638bd469533519f25ba5639b5
1.0
wanggang 5 years ago
parent a333ce7737
commit 55c6b24a04

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.2",
"commands": [
"dotnet-ef"
]
}
}
}

@ -1,11 +1,12 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Settings.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using System.Text;
namespace TeacherExt
{
@ -13,14 +14,24 @@ namespace TeacherExt
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
Console.OutputEncoding = Encoding.UTF8;
var config = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true)
.Build();
WebHost.CreateDefaultBuilder(args)
.UseConfiguration(config)
.ConfigureLogging((c, o) =>
{
webBuilder.UseStartup<Startup>();
});
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(config, ConfigurationAssemblySource.AlwaysScanDllFiles)
.WriteTo.Console()
.WriteTo.File("logs/log.txt", rollOnFileSizeLimit: true, fileSizeLimitBytes: 100 * 1024 * 1024, rollingInterval: RollingInterval.Infinite)
.CreateLogger();
o.AddSerilog();
})
.UseStartup<Startup>()
.Build()
.Run();
}
}
}
}

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishSingleFile>True</PublishSingleFile>
<ProjectGuid>861c7f70-5a77-481b-8827-d159e8b3c2ae</ProjectGuid>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>

@ -5,7 +5,8 @@
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
<Version>0.3.0.0</Version>
<Version>0.4.0.0</Version>
<UserSecretsId>13a75881-1072-47ca-88e9-4d78bd678d65</UserSecretsId>
</PropertyGroup>
<ItemGroup>
@ -16,6 +17,9 @@
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="install.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="update.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

@ -6,6 +6,7 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"server.urls": "http://*:8081",
"AllowedHosts": "*",
"database": "sqlite",
"jwt": {

@ -0,0 +1,8 @@
yum install libicu
mysqldump -uroot -pDsideaL147258369 dsideal_db t_sys_dic_item>/root/t_sys_dic_item.sql
mysqldump -uroot -pDsideaL147258369 dsideal_db t_base_person>/root/t_base_person.sql
mysql -uroot -pDsideaL147258369 dsideal_db<update.sql
nano /etc/rc.d/rc.local
cd /root/publish && ./TeacherExt

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,22 @@
#docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#docker-compose down --remove-orphans
version: "3.8"
services:
iotcenter:
image: mcr.microsoft.com/dotnet/core/runtime-deps:3.1-focal
restart: always
environment:
- TZ=Asia/Shanghai
- ASPNETCORE_ENVIRONMENT=Docker
command: bash -c "chmod +x /IoTCenter/IoTCenter && cd /IoTCenter && ./IoTCenter"
depends_on:
- mysql
- redis
ports:
- 8011:80
volumes:
- ./apps/IoTCenter:/IoTCenter
- ./docker/log/IoTCenter:/IotCenter/logs
networks:
default:
ipv4_address: 172.172.0.80

@ -0,0 +1,191 @@
version: "3.8"
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.172.0.0/24
services:
#monitor
netdata:
image: netdata/netdata:latest-amd64
hostname: localhost
ports:
- 9999:19999
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
default:
ipv4_address: 172.172.0.100
#container management
portainer:
image: portainer/portainer:1.24.1
restart: always
ports:
- 9002:9000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker/data/portainer:/data
networks:
default:
ipv4_address: 172.172.0.101
#web site
website:
image: nginx:1.18.0
restart: always
environment:
TZ: "Asia/Shanghai"
ports:
- 80:80
- 443:443
volumes:
- ./docker/conf/website/nginx.conf:/etc/nginx/nginx.conf
- ./docker/conf/website/edusoa.pem:/etc/nginx/edusoa.pem
- ./docker/conf/website/edusoa.key:/etc/nginx/edusoa.key
- ./docker/log/website:/var/log/nginx
- ./apps/WebMVC/wwwroot:/root/nginx/html/desktop
- ./apps/WebSPA/wwwroot:/root/nginx/html/mobile
networks:
default:
ipv4_address: 172.172.0.10
#gateway
gateway:
image: nginx:1.18.0
restart: always
environment:
TZ: "Asia/Shanghai"
ports:
- 8000:80
volumes:
- ./docker/conf/gateway/nginx.conf:/etc/nginx/nginx.conf
- ./docker/log/gateway:/var/log/nginx
networks:
default:
ipv4_address: 172.172.0.12
#file server
minio:
image: minio/minio:RELEASE.2020-08-08T04-50-06Z
restart: always
environment:
MINIO_ACCESS_KEY: "admin"
MINIO_SECRET_KEY: "12345678"
command: server /data
ports:
- 9000:9000
volumes:
- ./docker/data/minio:/data
networks:
default:
ipv4_address: 172.172.0.20
#database server
mysql:
image: mysql:8.0.21
restart: always
environment:
- MYSQL_ROOT_PASSWORD=aA123456!
- MYSQL_DATABASE=jobserver
command: --default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
volumes:
- ./docker/conf/mysql/my.cnf:/etc/my.cnf
- ./docker/data/mysql:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h localhost -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
timeout: 10s
retries: 30
networks:
default:
ipv4_address: 172.172.0.30
#mysql web manager
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
ports:
- 9003:80
networks:
default:
ipv4_address: 172.172.0.102
influxdb:
image: influxdb:1.8.1
restart: always
environment:
TZ: "Asia/Shanghai"
INFLUXDB_ADMIN_ENABLED: "true"
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
ports:
- 8086:8086
- 8088:8088
volumes:
- ./docker/data/influxdb:/var/lib/influxdb
networks:
default:
ipv4_address: 172.172.0.50
#use old version influxdb web manager
influxdb-web:
image: influxdb:1.2.4
restart: always
environment:
TZ: "Asia/Shanghai"
INFLUXDB_ADMIN_ENABLED: "true"
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
ports:
- 8083:8083
networks:
default:
ipv4_address: 172.172.0.104
#cache server
redis:
image: redis:6.0.6
restart: always
ports:
- 6379:6379
volumes:
- ./docker/data/redis:/data
- ./docker/conf/redis/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
default:
ipv4_address: 172.172.0.40
#redis web manager
phpredisadmin:
image: erikdubbelboer/phpredisadmin
restart: always
environment:
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
- ADMIN_USER=admin
- ADMIN_PASS=123456
ports:
- 9004:80
networks:
default:
ipv4_address: 172.172.0.103
#streaming server
srs:
image: ubuntu
environment:
TZ: "Asia/Shanghai"
restart: always
ports:
- 1935:1935
- 8080:8080
- 1985:1985
working_dir: /usr/local/srs
command: bash -c "chmod +x ./objs/srs && ./objs/srs -c ./conf/srs.conf"
volumes:
- ./apps/srs:/usr/local/srs
networks:
default:
ipv4_address: 172.172.0.60
Loading…
Cancel
Save