diff --git a/MiniSpace.APIGateway/scripts/dockerize-tag-push.sh b/MiniSpace.APIGateway/scripts/dockerize-tag-push.sh old mode 100644 new mode 100755 diff --git a/MiniSpace.Services.Identity/scripts/dockerize-tag-push.sh b/MiniSpace.Services.Identity/scripts/dockerize-tag-push.sh old mode 100644 new mode 100755 diff --git a/MiniSpace.Web/Dockerfile b/MiniSpace.Web/Dockerfile index 6c3d0ea83..faced5f3d 100644 --- a/MiniSpace.Web/Dockerfile +++ b/MiniSpace.Web/Dockerfile @@ -1,11 +1,21 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +# Use the .NET 6 SDK for building the project +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app + +# Copy everything and publish the release COPY . . -RUN dotnet publish src/MiniSpace.Web -c release -o out +RUN dotnet publish src/MiniSpace.Web -c Release -o out -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 +# Use the .NET 6 runtime for the final image +FROM mcr.microsoft.com/dotnet/aspnet:8.0 WORKDIR /app + +# Copy the published app from the build stage COPY --from=build /app/out . -ENV ASPNETCORE_URLS http://*:80 -ENV ASPNETCORE_ENVIRONMENT docker -ENTRYPOINT dotnet MiniSpace.Web.dll \ No newline at end of file + +# Set environment variables +ENV ASPNETCORE_URLS=http://*:80 +ENV ASPNETCORE_ENVIRONMENT=docker + +# Start the application +ENTRYPOINT ["dotnet", "MiniSpace.Web.dll"] diff --git a/MiniSpace.Web/scripts/dockerize-tag-push.sh b/MiniSpace.Web/scripts/dockerize-tag-push.sh old mode 100644 new mode 100755 diff --git a/MiniSpace.Web/src/MiniSpace.Web/MiniSpace.Web.csproj b/MiniSpace.Web/src/MiniSpace.Web/MiniSpace.Web.csproj index a37667483..6b457aa04 100644 --- a/MiniSpace.Web/src/MiniSpace.Web/MiniSpace.Web.csproj +++ b/MiniSpace.Web/src/MiniSpace.Web/MiniSpace.Web.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 diff --git a/MiniSpace.Web/src/MiniSpace.Web/appsettings.json b/MiniSpace.Web/src/MiniSpace.Web/appsettings.json index c9ec0bf68..f1d6787a7 100644 --- a/MiniSpace.Web/src/MiniSpace.Web/appsettings.json +++ b/MiniSpace.Web/src/MiniSpace.Web/appsettings.json @@ -8,7 +8,7 @@ }, "AllowedHosts": "*", "HttpClientOptions": { - "ApiUrl": "http://localhost:5000", + "ApiUrl": "http://api-gateway", "Retries": 3 }, "Services": { diff --git a/MiniSpace/scripts/dockerize-all.sh b/MiniSpace/scripts/dockerize-all.sh old mode 100644 new mode 100755