-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/ticket 292789 v2 #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a68d10c
Added local dev functionality for containers etc
owen-lakin f5c24dd
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin 3bd43f9
Local development key decryption setup for use with a container
owen-lakin 0143662
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin a76cb37
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin 6e485a1
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin 80a613c
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin 4adcb9b
Merge branch 'main' into feature/ticket-292789-v2
owen-lakin c6592d9
Updates to the docker-compose file
owen-lakin 25e479b
Added line that was removed in error
owen-lakin 40fa5ba
Updated the dockercompose for the dataprotection keys
owen-lakin 6424749
Added co pilot suggestion for CI changes
owen-lakin 2673b7c
Added new CI updates to allow access to the key ring folder
owen-lakin e7309ba
Co pilot updates
owen-lakin 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,4 +185,5 @@ uploads/ | |
|
|
||
| Directory.Build.targets.user | ||
| /src/LocalPackages | ||
| .cursor | ||
| .cursor | ||
| /encryption-keys | ||
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,40 @@ | ||
| # See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
|
||
| # This stage is used when running from VS in fast mode (Default for Debug configuration) | ||
| FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base | ||
| USER root | ||
| WORKDIR /app | ||
| EXPOSE 8080 | ||
| EXPOSE 8081 | ||
|
|
||
| # This stage is used to build the service project | ||
| FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build | ||
| ENV CI=true | ||
| ARG BUILD_CONFIGURATION=Debug | ||
| WORKDIR /src | ||
| COPY ["Directory.Build.props", "."] | ||
| COPY ["src/GovUK.Dfe.FlexForms.Api/GovUK.Dfe.FlexForms.Api.csproj", "src/GovUK.Dfe.FlexForms.Api/"] | ||
| COPY ["src/GovUK.Dfe.FlexForms.Application/GovUK.Dfe.FlexForms.Application.csproj", "src/GovUK.Dfe.FlexForms.Application/"] | ||
| COPY ["src/GovUK.Dfe.FlexForms.Domain/GovUK.Dfe.FlexForms.Domain.csproj", "src/GovUK.Dfe.FlexForms.Domain/"] | ||
| COPY ["src/GovUK.Dfe.FlexForms.Utils/GovUK.Dfe.FlexForms.Utils.csproj", "src/GovUK.Dfe.FlexForms.Utils/"] | ||
| COPY ["src/GovUK.Dfe.FlexForms.Infrastructure/GovUK.Dfe.FlexForms.Infrastructure.csproj", "src/GovUK.Dfe.FlexForms.Infrastructure/"] | ||
| RUN dotnet restore "./src/GovUK.Dfe.FlexForms.Api/GovUK.Dfe.FlexForms.Api.csproj" | ||
| COPY . . | ||
| WORKDIR "/src/src/GovUK.Dfe.FlexForms.Api" | ||
| RUN dotnet build "./GovUK.Dfe.FlexForms.Api.csproj" -c $BUILD_CONFIGURATION -p:SkipDockerCompose=true -o /app/build | ||
|
|
||
| # This stage is used to publish the service project to be copied to the final stage | ||
| FROM build AS publish | ||
| ARG BUILD_CONFIGURATION=Debug | ||
| RUN dotnet publish "./GovUK.Dfe.FlexForms.Api.csproj" -c $BUILD_CONFIGURATION -p:SkipDockerCompose=true -o /app/publish /p:UseAppHost=false | ||
|
|
||
| # This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration) | ||
| FROM base AS final | ||
| WORKDIR /app | ||
| COPY --from=publish /app/publish . | ||
|
|
||
| COPY script/dev-api-docker-entrypoint.sh /app/docker-entrypoint.sh | ||
| RUN sed -i 's/\r$//' /app/docker-entrypoint.sh | ||
| RUN chmod +x /app/docker-entrypoint.sh | ||
|
|
||
| ENTRYPOINT ["/app/docker-entrypoint.sh"] |
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,47 @@ | ||
| name: dfe-flexforms | ||
|
|
||
| networks: | ||
| dfe-flexforms-network: | ||
| name: dfe-flexforms-network | ||
| driver: bridge | ||
| external: true | ||
| dfe-shared-network: | ||
| name: dfe-shared-network | ||
| external: true | ||
|
|
||
| services: | ||
| ea_api: | ||
| container_name: ea-flexforms-api | ||
| cap_add: | ||
| - SYS_PTRACE | ||
| security_opt: | ||
| - seccomp:unconfined | ||
| build: | ||
| context: ${REPO_PATH} | ||
| dockerfile: Dockerfile.dev | ||
| ports: | ||
| - 5277:8080 | ||
| - 7089:8081 | ||
| restart: unless-stopped | ||
| environment: | ||
| - ConnectionStrings__DefaultConnection=Server=sql,1433;Database=ExternalApplications;User Id=SA;Password=Pa55w0rd!;TrustServerCertificate=True; | ||
| - ConnectionStrings__TenantConfigDatabase=Server=sql,1433;Database=TenantConfig;User Id=SA;Password=Pa55w0rd!;TrustServerCertificate=True; | ||
| - ConnectionStrings__Redis=redis:6379 | ||
| - CacheSettings__Redis__ConnectionString=redis:6379 | ||
| - DataProtection__UseAzure=false | ||
| - DataProtection__UseStorageSas=false | ||
| - DataProtection__ApplicationName=GovUK.Dfe.FlexForms.Api | ||
| - DataProtection__LocalKeysPath=/home/app/.aspnet/DataProtection-Keys | ||
| - Tenants__CodeGeneration__ConnectionStrings__Redis=redis:6379 | ||
| - ASPNETCORE_URLS=https://+:8081;http://+:8080 | ||
| - ASPNETCORE_ENVIRONMENT=Development | ||
| - ASPNETCORE_Kestrel__Certificates__Default__Password=Pa55w0rd | ||
| - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/docker_dev_cert.pfx | ||
| volumes: | ||
| - ${APPDATA}/dev-certs/docker_dev_cert.pfx:/https/docker_dev_cert.pfx:ro | ||
| - ${APPDATA}/Microsoft/UserSecrets/f714ca7a-fc08-46ff-b0cc-373d6f04cf4c:/home/app/.microsoft/usersecrets/f714ca7a-fc08-46ff-b0cc-373d6f04cf4c:ro | ||
| - ${APPDATA}/mkcert/rootCA.pem:/usr/local/share/ca-certificates/mkcert-rootCA.crt:ro | ||
| - ${APPDATA}/DataProtection-Keys:/home/app/.aspnet/DataProtection-Keys:rw | ||
| networks: | ||
| - dfe-flexforms-network | ||
| - dfe-shared-network |
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,7 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| #apt-get update | ||
| #update-ca-certificates | ||
|
|
||
| exec su app -s /bin/sh -c "dotnet GovUK.Dfe.FlexForms.Api.dll" |
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,4 @@ | ||
| <Project> | ||
| <Import Project="Directory.Build.targets.user" | ||
| Condition="Exists('Directory.Build.targets.user')" /> | ||
| </Project> |
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,4 @@ | ||
| <Project> | ||
| <Import Project="Directory.Build.targets.user" | ||
| Condition="Exists('Directory.Build.targets.user')" /> | ||
| </Project> |
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.
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.