Skip to content

Commit 5130f6e

Browse files
Adding Docker support for Orders service
1 parent 1334d74 commit 5130f6e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

orders-service-dotnet/Functions/SubmitNewOrder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async Task<IActionResult> Run(
6161
}
6262
catch (ServiceBusException sbx)
6363
{
64-
// TODO: retry policy...
64+
// TODO: think about retry policy (e.g. https://github.com/jeffhollan/functions-csharp-queue-exponential/blob/master/ExponentialRetry.cs)
6565
log.LogError(sbx, "Service Bus Error");
6666
throw;
6767
}

products-service-dotnet/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local.settings.json

products-service-dotnet/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM microsoft/dotnet:2.2-sdk AS installer-env
2+
3+
COPY . /src/dotnet-function-app
4+
RUN cd /src/dotnet-function-app && \
5+
mkdir -p /home/site/wwwroot && \
6+
dotnet publish *.csproj --output /home/site/wwwroot
7+
8+
FROM mcr.microsoft.com/azure-functions/dotnet:2.0
9+
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
10+
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
11+
12+
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]

0 commit comments

Comments
 (0)