fix: move api port mapping to dev override, fix Web Dockerfile project name
- Base compose has no ports (env overrides define them) - Dev override maps api to 5200:8080 - Web Dockerfile updated to reference .Web project name Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -13,20 +13,20 @@ COPY ["Directory.Packages.props", "."]
|
||||
COPY ["HrynCo.NotificationService.DAL.Abstract/HrynCo.NotificationService.DAL.Abstract.csproj", "HrynCo.NotificationService.DAL.Abstract/"]
|
||||
COPY ["HrynCo.NotificationService.DAL.EF/HrynCo.NotificationService.DAL.EF.csproj", "HrynCo.NotificationService.DAL.EF/"]
|
||||
COPY ["HrynCo.NotificationService.Services/HrynCo.NotificationService.Services.csproj", "HrynCo.NotificationService.Services/"]
|
||||
COPY ["HrynCo.NotificationService.Api/HrynCo.NotificationService.Api.csproj", "HrynCo.NotificationService.Api/"]
|
||||
COPY ["HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj", "HrynCo.NotificationService.Web/"]
|
||||
|
||||
RUN dotnet restore "HrynCo.NotificationService.Api/HrynCo.NotificationService.Api.csproj"
|
||||
RUN dotnet restore "HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj"
|
||||
|
||||
COPY . .
|
||||
|
||||
WORKDIR "/src/HrynCo.NotificationService.Api"
|
||||
RUN dotnet build "./HrynCo.NotificationService.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
WORKDIR "/src/HrynCo.NotificationService.Web"
|
||||
RUN dotnet build "./HrynCo.NotificationService.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./HrynCo.NotificationService.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "./HrynCo.NotificationService.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "HrynCo.NotificationService.Api.dll"]
|
||||
ENTRYPOINT ["dotnet", "HrynCo.NotificationService.Web.dll"]
|
||||
@@ -17,8 +17,6 @@ services:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- App__ConnectionString=${CONNECTION_STRING}
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_started
|
||||
|
||||
Reference in New Issue
Block a user