Skip to content

Commit

Permalink
Update for CSLA 5.3.0; add docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
rockfordlhotka committed Jul 24, 2020
1 parent 27e1d37 commit 14f2358
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 15 deletions.
25 changes: 25 additions & 0 deletions Samples/BlazorExample/.dockerignore
@@ -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
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Csla.Blazor.WebAssembly" Version="5.2.0" />
<PackageReference Include="Csla.Blazor.WebAssembly" Version="5.3.0-R20062901" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
Expand Down
Expand Up @@ -35,8 +35,6 @@ else
}

@code {
string errortext;

protected override async Task OnParametersSetAsync()
{
await vm.RefreshAsync(() => Csla.DataPortal.FetchAsync<PersonList>());
Expand Down
2 changes: 1 addition & 1 deletion Samples/BlazorExample/BlazorExample/Client/Program.cs
Expand Up @@ -26,7 +26,7 @@ public static async Task Main(string[] args)

builder.UseCsla((c) =>
c.DataPortal().DefaultProxy(
typeof(Csla.DataPortalClient.HttpProxy), "http://localhost:57416/api/DataPortal"));
typeof(Csla.DataPortalClient.HttpProxy), "/api/DataPortal"));

var host = builder.Build();

Expand Down
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Csla" Version="5.2.0" />
<PackageReference Include="Csla" Version="5.3.0-R20062901" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Csla" Version="5.2.0" />
<PackageReference Include="Csla" Version="5.3.0-R20062901" />
</ItemGroup>

<ItemGroup>
Expand Down
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Csla" Version="5.2.0" />
<PackageReference Include="Csla" Version="5.3.0-R20062901" />
</ItemGroup>

</Project>
Expand Up @@ -3,21 +3,24 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>7.3</LangVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Csla.AspNetCore" Version="5.2.0" />
<PackageReference Include="Csla.Blazor" Version="5.2.0" />
<PackageReference Include="Csla.AspNetCore" Version="5.3.0-R20062901" />
<PackageReference Include="Csla.Blazor" Version="5.3.0-R20062901" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="3.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.2.0-preview3.20168.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
</ItemGroup>

Expand Down
26 changes: 26 additions & 0 deletions Samples/BlazorExample/BlazorExample/Server/Dockerfile
@@ -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 ["BlazorExample/Server/BlazorExample.Server.csproj", "BlazorExample/Server/"]
COPY ["BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj", "BlazorExample/DataAccess.Mock/"]
COPY ["BlazorExample/DataAccess/DataAccess.csproj", "BlazorExample/DataAccess/"]
COPY ["BlazorExample/DataAccess.EF/DataAccess.EF.csproj", "BlazorExample/DataAccess.EF/"]
COPY ["BlazorExample/Client/BlazorExample.Client.csproj", "BlazorExample/Client/"]
COPY ["BlazorExample/Shared/BlazorExample.Shared.csproj", "BlazorExample/Shared/"]
RUN dotnet restore "BlazorExample/Server/BlazorExample.Server.csproj"
COPY . .
WORKDIR "/src/BlazorExample/Server"
RUN dotnet build "BlazorExample.Server.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "BlazorExample.Server.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BlazorExample.Server.dll"]
Expand Up @@ -11,19 +11,25 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"BlazorExample.Server": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:57413/"
"applicationUrl": "http://localhost:57413/",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true
}
}
}
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Csla" Version="5.2.0" />
<PackageReference Include="Csla" Version="5.3.0-R20062901" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 14f2358

Please sign in to comment.