Updated nuget packages, initial docker work.

This commit is contained in:
Steven HIldreth 2020-10-04 11:55:07 -05:00
parent ad119a41c2
commit ccef1d365a
9 changed files with 102 additions and 38 deletions

25
.dockerignore Normal file
View 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

View file

@ -22,7 +22,7 @@
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
</ItemGroup>
<ItemGroup>

View file

@ -23,8 +23,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>

View file

@ -239,6 +239,22 @@ namespace Roadie.Library.Engines
};
}
// See if roadie.json file exists in the metadata files folder, if so then use artist data from that
string releaseRoadieDataFilename = null;
try
{
releaseRoadieDataFilename = Path.Combine(Path.GetDirectoryName(metaData.Filename), "roadie.artist.json");
}
catch (Exception)
{
}
if (!string.IsNullOrEmpty(releaseRoadieDataFilename) && File.Exists(releaseRoadieDataFilename))
{
var artistFromJson = CacheManager.CacheSerializer.Deserialize<Artist>(File.ReadAllText(releaseRoadieDataFilename));
artistName = artistFromJson?.Name;
}
var artist = (await DatabaseQueryForArtistName(artistName).ConfigureAwait(false)).FirstOrDefault();
sw.Stop();
if (artist?.IsValid != true)
@ -247,16 +263,6 @@ namespace Roadie.Library.Engines
if (doFindIfNotInDatabase)
{
OperationResult<Artist> artistSearch = null;
// See if roadie.json file exists in the metadata files folder, if so then use artist data from that
string releaseRoadieDataFilename = null;
try
{
releaseRoadieDataFilename = Path.Combine(Path.GetDirectoryName(metaData.Filename), "roadie.artist.json");
}
catch (Exception)
{
}
if (!string.IsNullOrEmpty(releaseRoadieDataFilename) && File.Exists(releaseRoadieDataFilename))
{
artist = CacheManager.CacheSerializer.Deserialize<Artist>(File.ReadAllText(releaseRoadieDataFilename));

View file

@ -9,40 +9,40 @@
<ItemGroup>
<PackageReference Include="AutoCompare.Core" Version="1.0.0" />
<PackageReference Include="CsvHelper" Version="15.0.5" />
<PackageReference Include="EFCore.BulkExtensions" Version="3.1.5" />
<PackageReference Include="FluentFTP" Version="32.4.3" />
<PackageReference Include="CsvHelper" Version="15.0.6" />
<PackageReference Include="EFCore.BulkExtensions" Version="3.2.3" />
<PackageReference Include="FluentFTP" Version="32.4.5" />
<PackageReference Include="Hashids.net" Version="1.3.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.24" />
<PackageReference Include="IdSharp.Common" Version="1.0.1" />
<PackageReference Include="IdSharp.Tagging" Version="1.0.0-rc3" />
<PackageReference Include="Inflatable.Lastfm" Version="1.2.0" />
<PackageReference Include="LiteDB" Version="5.0.9" />
<PackageReference Include="Magick.NET-Q16-x64" Version="7.21.1" />
<PackageReference Include="Mapster" Version="6.1.1" />
<PackageReference Include="Magick.NET-Q16-x64" Version="7.22.0" />
<PackageReference Include="Mapster" Version="6.5.0" />
<PackageReference Include="MetadataExtractor" Version="2.4.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="1.3.5" />
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.2.8" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.0.3" />
<PackageReference Include="MimeMapping" Version="1.0.1.30" />
<PackageReference Include="NodaTime" Version="3.0.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
<PackageReference Include="RestSharp" Version="106.11.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.2.2" />
<PackageReference Include="RestSharp" Version="106.11.7" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0008" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0007" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.1" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0010" />
<PackageReference Include="SixLabors.Shapes" Version="1.0.0-beta0009" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.7.0" />
<PackageReference Include="System.Runtime.Caching" Version="4.7.0" />
<PackageReference Include="Utf8Json" Version="1.3.7" />
<PackageReference Include="z440.atl.core" Version="3.7.0" />
<PackageReference Include="z440.atl.core" Version="3.11.0" />
<PackageReference Include="zlib.net-mutliplatform" Version="1.0.4" />
</ItemGroup>

View file

@ -7,10 +7,10 @@
<ItemGroup>
<PackageReference Include="Hashids.net" Version="1.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.1" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.2" />
</ItemGroup>
<ItemGroup>

26
Roadie.Api/Dockerfile Normal file
View file

@ -0,0 +1,26 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["Roadie.Api/Roadie.Api.csproj", "Roadie.Api/"]
COPY ["Roadie.Api.Services/Roadie.Api.Services.csproj", "Roadie.Api.Services/"]
COPY ["Roadie.Api.Library/Roadie.Library.csproj", "Roadie.Api.Library/"]
COPY ["Roadie.Dlna/Roadie.Dlna.csproj", "Roadie.Dlna/"]
COPY ["Roadie.Api.Hubs/Roadie.Api.Hubs.csproj", "Roadie.Api.Hubs/"]
COPY ["Roadie.Dlna.Services/Roadie.Dlna.Services.csproj", "Roadie.Dlna.Services/"]
RUN dotnet restore "Roadie.Api/Roadie.Api.csproj"
COPY . .
WORKDIR "/src/Roadie.Api"
RUN dotnet build "Roadie.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Roadie.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Roadie.Api.dll"]

View file

@ -6,6 +6,11 @@
"ASPNETCORE_ENVIRONMENT": "Production"
},
"applicationUrl": "http://localhost:5123/"
},
"Docker": {
"commandName": "Docker",
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true
}
}
}

View file

@ -10,6 +10,7 @@
<Platforms>AnyCPU;x64</Platforms>
<UserSecretsId>3f484b72-52aa-42ae-938d-4635f9511319</UserSecretsId>
<Version>1.1.3</Version>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -29,16 +30,17 @@
<ItemGroup>
<PackageReference Include="BCrypt-Core" Version="2.0.0" />
<PackageReference Include="Mapster" Version="6.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.14.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.7" />
<PackageReference Include="Mapster" Version="6.5.0" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.15.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.8" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.4" />
<PackageReference Include="Pastel" Version="1.3.2" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
@ -50,7 +52,7 @@
<PackageReference Include="Serilog.Sinks.LiteDB.NetStandard" Version="1.0.14" />
<PackageReference Include="Serilog.Sinks.RollingFileAlternate" Version="2.0.9" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.1" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.2" />
</ItemGroup>
<ItemGroup>