Merge
This commit is contained in:
commit
86ebf2d316
25
.dockerignore
Normal file
25
.dockerignore
Normal file
@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
@ -1,7 +1,6 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Squirrowse.Client.Service;
|
||||
using Squirrowse.Core.Services;
|
||||
|
||||
namespace Squirrowse.Client
|
||||
{
|
||||
@ -18,10 +17,10 @@ namespace Squirrowse.Client
|
||||
.ConfigureServices((hostContext, services) =>
|
||||
{
|
||||
services.AddHostedService<Worker>();
|
||||
services.AddSingleton<IConnectionManager,ConnectionManager>(x =>
|
||||
new ConnectionManager("http://localhost", 5000)); //keep as transient for now
|
||||
services.AddSingleton<IConnectionManager>(x=> new ConnectionManager("http://localhost", 44366)); //keep as transient for now
|
||||
services.AddSingleton< ICameraService, CameraService >(x=>new CameraService(new Camera()));
|
||||
services.AddSingleton<IActionDispatcher, ActionDispatcher>();
|
||||
services.AddTransient<IStreamService, StreamService>();
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
21
Squirrowse.Service/Dockerfile
Normal file
21
Squirrowse.Service/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 5000
|
||||
EXPOSE 5001
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
|
||||
WORKDIR /src
|
||||
COPY ["Squirrowse.Service/Squirrowse.Service.csproj", "Squirrowse.Service/"]
|
||||
COPY ["Squirrowse.Core/Squirrowse.Core.csproj", "Squirrowse.Core/"]
|
||||
RUN dotnet restore "Squirrowse.Service/Squirrowse.Service.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Squirrowse.Service"
|
||||
RUN dotnet build "Squirrowse.Service.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "Squirrowse.Service.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "Squirrowse.Service.dll"]
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
@ -8,11 +7,10 @@
|
||||
"sslPort": 44365
|
||||
}
|
||||
},
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
@ -21,10 +19,22 @@
|
||||
"commandName": "Project",
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "weatherforecast",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_URLS": "https://+:443;http://+:80",
|
||||
"ASPNETCORE_HTTPS_PORT": "44366"
|
||||
},
|
||||
"httpPort": 59338,
|
||||
"useSSL": true,
|
||||
"sslPort": 44366
|
||||
}
|
||||
}
|
||||
}
|
@ -2,19 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<StartupObject>Squirrowse.Service.Program</StartupObject>
|
||||
<UserSecretsId>996aee3a-63a2-4e6b-abcd-b0c6a183af8c</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="dll\openh264-1.8.0-win64.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="dll\openh264-1.8.0-win64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
</ItemGroup>
|
||||
@ -24,6 +15,7 @@
|
||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="3.0.0-*" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.5" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" />
|
||||
<PackageReference Include="System.Reactive.Linq" Version="4.0.0" />
|
||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.1.1.20191021" />
|
||||
@ -33,10 +25,4 @@
|
||||
<ProjectReference Include="..\Squirrowse.Core\Squirrowse.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user