This repository was archived by the owner on Jul 28, 2025. It is now read-only.
generated from nhs-england-tools/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: DTOSS-9084 - Docker container for service layer mesh project #22
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
79f9f9b
feat: initial docker file
SamTyrrellNHS 4ab78bb
Merge branch 'main' into feat/dockerContainerForServiceLayerMesh
SamTyrrellNHS 92212a8
feat: fixing image builds
SamTyrrellNHS dc54788
Merge branch 'main' into feat/dockerContainerForServiceLayerMesh
SamTyrrellNHS ca55dfd
feat: now can comunicate with mesh sandbox and dbcontext threading is…
SamTyrrellNHS 3351f87
feat: fixing issue with dequeueing messages
SamTyrrellNHS ae98719
feat: removing chatGPTs stupid recomended changes around AddDbcontext
SamTyrrellNHS 69285b8
feat: fixing blob container doesn't exist issue
SamTyrrellNHS 0d380e2
feat: responding to comments
SamTyrrellNHS 99b0fc6
merging with main
SamTyrrellNHS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| namespace ServiceLayer.Common; | ||
|
|
||
| public static class EnvironmentVariables | ||
| { | ||
| /// <summary> | ||
| /// Gets an environment variable by name. Throws if not found. | ||
| /// </summary> | ||
| /// <param name="key">The name of the environment variable.</param> | ||
| /// <returns>The value of the environment variable.</returns> | ||
| /// <exception cref="InvalidOperationException">Thrown when the variable is not found or is empty.</exception> | ||
| public static string GetRequired(string key) | ||
| { | ||
| var value = Environment.GetEnvironmentVariable(key); | ||
|
|
||
| if (string.IsNullOrEmpty(value)) | ||
| { | ||
| throw new InvalidOperationException($"Environment variable '{key}' is not set or is empty."); | ||
| } | ||
|
|
||
| return value; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| FROM mcr.microsoft.com/dotnet/sdk:9.0 AS installer-env | ||
| WORKDIR /src/dotnet-function-app | ||
|
|
||
| COPY ./dotnet-mesh-client/application/DotNetMeshClient/NHS.Mesh.Client/NHS.Mesh.Client.csproj ../dotnet-mesh-client/application/DotNetMeshClient/NHS.Mesh.Client/ | ||
| COPY ./ServiceLayer.Common/ServiceLayer.Common.csproj ../ServiceLayer.Common/ | ||
| COPY ./ServiceLayer.Mesh/ServiceLayer.Mesh.csproj . | ||
| RUN dotnet restore | ||
|
|
||
| COPY ./dotnet-mesh-client/ ../dotnet-mesh-client/ | ||
| COPY ./ServiceLayer.Common/ ../ServiceLayer.Common/ | ||
| COPY ./ServiceLayer.Mesh/ . | ||
|
|
||
| RUN dotnet publish -c Release -o /home/site/wwwroot | ||
|
|
||
| FROM mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated9.0 AS production | ||
| ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ | ||
| AzureFunctionsJobHost__Logging__Console__IsEnabled=true \ | ||
| ASPNETCORE_ENVIRONMENT=Production | ||
|
|
||
| RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser | ||
| USER appuser | ||
|
|
||
| COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.