add configs

This commit is contained in:
prixod
2025-10-24 23:55:10 +04:00
parent 6cead15a5f
commit dee93134ae
11 changed files with 648 additions and 45 deletions

View File

@@ -1,16 +1,25 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj", "LiquidCode.Tester.Gateway/"]
RUN dotnet restore "LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj"
# Copy Common project
COPY ["src/LiquidCode.Tester.Common/LiquidCode.Tester.Common.csproj", "src/LiquidCode.Tester.Common/"]
# Copy Gateway project
COPY ["src/LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj", "src/LiquidCode.Tester.Gateway/"]
# Restore dependencies
RUN dotnet restore "src/LiquidCode.Tester.Gateway/LiquidCode.Tester.Gateway.csproj"
# Copy all source files
COPY . .
WORKDIR "/src/LiquidCode.Tester.Gateway"
# Build
WORKDIR "/src/src/LiquidCode.Tester.Gateway"
RUN dotnet build "./LiquidCode.Tester.Gateway.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
@@ -20,4 +29,10 @@ RUN dotnet publish "./LiquidCode.Tester.Gateway.csproj" -c $BUILD_CONFIGURATION
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
# Create directory for package downloads
RUN mkdir -p /tmp/packages
ENV ASPNETCORE_URLS=http://+:8080
ENTRYPOINT ["dotnet", "LiquidCode.Tester.Gateway.dll"]