From 85404f8d6c506f49cf46c4b1746348f9ba24ab1c Mon Sep 17 00:00:00 2001 From: msm1984 Date: Tue, 20 Aug 2024 20:51:36 +0330 Subject: [PATCH] fix: increase version of .net in CI file --- .github/workflows/CI_Backend.yml | 2 +- Dockerfile | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 Dockerfile diff --git a/.github/workflows/CI_Backend.yml b/.github/workflows/CI_Backend.yml index e113f27..f2c7990 100644 --- a/.github/workflows/CI_Backend.yml +++ b/.github/workflows/CI_Backend.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: "6.0.x" + dotnet-version: "8.0.x" - name: Restore dependencies run: dotnet restore diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a2c001b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Use the official .NET SDK image to build the app -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build -WORKDIR /app - -# Copy everything and restore as distinct layers -COPY . ./ -RUN dotnet restore - -# Build and publish the app to the out directory -RUN dotnet publish src/Web/Web.csproj -c Release -o out - -# Use the official ASP.NET image to serve the app -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime -WORKDIR /app -COPY --from=build /app/out ./ - -# Environment variables for the database connection -ENV ASPNETCORE_ENVIRONMENT=Development -ENV ConnectionStrings__DefaultConnection=Host=db;Database=YourDatabaseName;Username=yourusername;Password=yourpassword -ENV ASPNETCORE_URLS=http://*:80 -EXPOSE 80 - - -# Start the application -ENTRYPOINT ["dotnet", "Web.dll"] - - -