This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 11services :
2- # ## ✅ API Backend (Azure Functions in .NET 9) ###
2+ # ## ✅ API (Azure Functions in .NET 9) ###
33 api :
44 container_name : " api"
55 build :
6- context : ./src/api
6+ context : ./src
77 dockerfile : ServiceLayer.API/Dockerfile
88 platform : linux/amd64
99 restart : always
@@ -16,7 +16,6 @@ services:
1616 networks :
1717 - backend
1818
19-
2019networks :
2120 backend :
2221 driver : bridge
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/dotnet/sdk:9.0 AS installer-env
2+ WORKDIR /src/dotnet-function-app
3+
4+ COPY ./ServiceLayer.API/ServiceLayer.API.csproj .
5+ RUN dotnet restore
6+
7+ COPY ./ServiceLayer.API/ .
8+
9+ RUN dotnet publish -c Release -o /home/site/wwwroot
10+
11+ FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated9.0 AS production
12+ ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
13+ AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
14+ ASPNETCORE_ENVIRONMENT=Production
15+
16+ RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
17+ USER appuser
18+
19+ COPY --from=installer-env ["/home/site/wwwroot" , "/home/site/wwwroot" ]
You can’t perform that action at this time.
0 commit comments