Updates to make it work with Docker
- Dockerfiles changes - Minor csproj updates to bring back "dotnet bundle" cli - Enable all protocols in SignalR - Update package-lock.json in spa
This commit is contained in:
parent
36fb20acea
commit
684aa4927f
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Basket/Basket.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Catalog/Catalog.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -47,6 +47,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
|
||||
.AddCustomMVC(Configuration)
|
||||
.AddCustomDbContext(Configuration)
|
||||
.AddCustomOptions(Configuration)
|
||||
.AddIntegrationServices(Configuration)
|
||||
.AddEventBus(Configuration)
|
||||
.AddSwagger();
|
||||
|
||||
@ -228,7 +229,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API
|
||||
|
||||
}
|
||||
|
||||
public static IServiceCollection AddIntegrationServices(IServiceCollection services, IConfiguration configuration)
|
||||
public static IServiceCollection AddIntegrationServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddTransient<Func<DbConnection, IIntegrationEventLogService>>(
|
||||
sp => (DbConnection c) => new IntegrationEventLogService(c));
|
||||
|
@ -2,11 +2,12 @@ FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/aspnetcore-build:2.1.300-preview1 as build
|
||||
RUN npm install -g bower@1.8.4
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Identity/Identity.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -31,6 +31,10 @@
|
||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.7.385" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Certificate\idsrv3test.pfx" />
|
||||
</ItemGroup>
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Location/Locations.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Marketing/Marketing.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -4,15 +4,13 @@ EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY eShopOnContainers-ServicesAndWebApps.sln ./
|
||||
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub
|
||||
RUN dotnet build Ordering.SignalrHub.csproj -c Release -o /app
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore Ordering.SignalrHub.csproj -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish Ordering.SignalrHub.csproj -c Release -o /app
|
||||
RUN dotnet publish --no-restore Ordering.SignalrHub.csproj -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
|
@ -134,7 +134,7 @@ namespace Ordering.SignalrHub
|
||||
app.UseSignalR(routes =>
|
||||
{
|
||||
routes.MapHub<NotificationsHub>("/notificationhub", options =>
|
||||
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets);
|
||||
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransports.All);
|
||||
});
|
||||
|
||||
ConfigureEventBus(app);
|
||||
|
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Services/Payment/Payment.API
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -2,11 +2,12 @@ FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/aspnetcore-build:2.1.300-preview1 AS build
|
||||
RUN npm install -g bower@1.8.4
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Web/WebMVC
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
@ -34,6 +34,11 @@
|
||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.7.385" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj" />
|
||||
<ProjectReference Include="..\..\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks\Microsoft.Extensions.HealthChecks.csproj" />
|
||||
|
@ -2,11 +2,12 @@ FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
FROM microsoft/aspnetcore-build:2.1.300-preview1 AS build
|
||||
RUN npm i -g npm
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Web/WebSPA
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
15957
src/Web/WebSPA/package-lock.json
generated
15957
src/Web/WebSPA/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@ EXPOSE 80
|
||||
FROM microsoft/dotnet:2.1-sdk AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
WORKDIR /src/src/Web/WebStatus
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
|
Loading…
x
Reference in New Issue
Block a user