Skip to content
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

Example go project #6

Merged
merged 14 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
134 changes: 70 additions & 64 deletions TelephoneDirectory.sln

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ services:
- ELASTICSEARCH_URL=http://localhost:9200
networks:
- elastic

examplego.api:
container_name: examplego.api
ports:
- "9000:80"
networks:
elastic:
driver: bridge
Expand Down
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,28 @@ services:
image: guide_image
build:
context: .
dockerfile: src/Microservices/Guide/TelephoneDirectory.Guide/Dockerfile
dockerfile: src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/Dockerfile
report.api:
image: report_image
build:
context: .
dockerfile: src/Microservices/Report/TelephoneDirectory.Report/Dockerfile
dockerfile: src/Microservices/Csharp/Report/TelephoneDirectory.Report/Dockerfile
auth.api:
image: auth_image
build:
context: .
dockerfile: src/Microservices/Auth/TelephoneDirectory.Auth/Dockerfile
dockerfile: src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/Dockerfile
gateway.api:
image: gateway_api_image
build:
context: .
dockerfile: src/Global/Gateway.WebApi/Dockerfile
pgAdmin4:
image: dpage/pgadmin4
examplego.api:
image: examplego_api_image
build:
context: src/Microservices/Golang/Example
volumes:
authdb_volume:

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Routes": [
{
"DownstreamPathTemplate": "/api/examplego/{everything}",
"ServiceName": "examplego",
"UpstreamPathTemplate": "/gateway/examplego/{everything}",
"UpstreamHttpMethod": [ "POST", "PUT", "GET", "DELETE" ]
}
]
}
1 change: 1 addition & 0 deletions src/Global/Gateway.WebApi/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
3 changes: 3 additions & 0 deletions src/Global/Gateway.WebApi/appsettings.Production.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
},
"auth": {
"DownstreamPath": "http://auth.api:80"
},
"examplego": {
"DownstreamPath": "http://examplego.api:80"
}
},
"GlobalConfiguration": {
Expand Down
3 changes: 3 additions & 0 deletions src/Global/Gateway.WebApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
},
"auth": {
"DownstreamPath": "http://localhost:44001"
},
"examplego": {
"DownstreamPath": "http://localhost:9000"
}
},
"HealthChecks-UI": {
Expand Down
2 changes: 1 addition & 1 deletion src/Global/Gateway.WebApi/ocelot.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Routes":[{"SwaggerKey":"auth","DownstreamPathTemplate":"/api/login/{everything}","UpstreamPathTemplate":"/gateway/login/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"auth","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null},{"SwaggerKey":"guide","DownstreamPathTemplate":"/api/guide/{everything}","UpstreamPathTemplate":"/gateway/guide/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"guide","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null},{"SwaggerKey":"report","DownstreamPathTemplate":"/api/report/{everything}","UpstreamPathTemplate":"/gateway/report/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"report","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null}],"DynamicRoutes":[],"Aggregates":[],"GlobalConfiguration":{"RequestIdKey":"OcRequestId","ServiceDiscoveryProvider":{"Scheme":null,"Host":null,"Port":0,"Type":"AppConfiguration","Token":null,"ConfigurationKey":null,"PollingInterval":0,"Namespace":null},"RateLimitOptions":{"ClientIdHeader":"ClientId","QuotaExceededMessage":null,"RateLimitCounterPrefix":"ocelot","DisableRateLimitHeaders":false,"HttpStatusCode":429},"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"BaseUrl":"http://localhost:44382","LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"DownstreamScheme":null,"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHttpVersion":null},"SwaggerEndPoints":[{"Key":"guide","VersionPlaceholder":"{version}","KeyToPath":"guide","Config":[{"Name":"Guide Web API","Version":"v1","Url":null,"Service":{"Name":"guide","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true},{"Key":"report","VersionPlaceholder":"{version}","KeyToPath":"report","Config":[{"Name":"Report Web API","Version":"v1","Url":null,"Service":{"Name":"report","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true},{"Key":"auth","VersionPlaceholder":"{version}","KeyToPath":"auth","Config":[{"Name":"Auth Web API","Version":"v1","Url":null,"Service":{"Name":"auth","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true}]}
{"Routes":[{"SwaggerKey":"auth","DownstreamPathTemplate":"/api/login/{everything}","UpstreamPathTemplate":"/gateway/login/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"auth","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null},{"SwaggerKey":null,"DownstreamPathTemplate":"/api/examplego/{everything}","UpstreamPathTemplate":"/gateway/examplego/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"examplego","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null},{"SwaggerKey":"guide","DownstreamPathTemplate":"/api/guide/{everything}","UpstreamPathTemplate":"/gateway/guide/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"guide","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null},{"SwaggerKey":"report","DownstreamPathTemplate":"/api/report/{everything}","UpstreamPathTemplate":"/gateway/report/{everything}","UpstreamHttpMethod":["POST","PUT","GET","DELETE"],"DownstreamHttpMethod":null,"AddHeadersToRequest":{},"UpstreamHeaderTransform":{},"DownstreamHeaderTransform":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"ChangeDownstreamPathTemplate":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0,"Region":null},"RouteIsCaseSensitive":false,"ServiceName":"report","ServiceNamespace":null,"DownstreamScheme":null,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"RateLimitOptions":{"ClientWhitelist":[],"EnableRateLimiting":false,"Period":null,"PeriodTimespan":0.0,"Limit":0},"AuthenticationOptions":{"AuthenticationProviderKey":null,"AllowedScopes":[]},"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHostAndPorts":[],"UpstreamHost":null,"Key":null,"DelegatingHandlers":[],"Priority":1,"Timeout":0,"DangerousAcceptAnyServerCertificateValidator":false,"SecurityOptions":{"IPAllowedList":[],"IPBlockedList":[]},"DownstreamHttpVersion":null}],"DynamicRoutes":[],"Aggregates":[],"GlobalConfiguration":{"RequestIdKey":"OcRequestId","ServiceDiscoveryProvider":{"Scheme":null,"Host":null,"Port":0,"Type":"AppConfiguration","Token":null,"ConfigurationKey":null,"PollingInterval":0,"Namespace":null},"RateLimitOptions":{"ClientIdHeader":"ClientId","QuotaExceededMessage":null,"RateLimitCounterPrefix":"ocelot","DisableRateLimitHeaders":false,"HttpStatusCode":429},"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"BaseUrl":"http://localhost:44382","LoadBalancerOptions":{"Type":null,"Key":null,"Expiry":0},"DownstreamScheme":null,"HttpHandlerOptions":{"AllowAutoRedirect":false,"UseCookieContainer":false,"UseTracing":false,"UseProxy":true,"MaxConnectionsPerServer":2147483647},"DownstreamHttpVersion":null},"SwaggerEndPoints":[{"Key":"guide","VersionPlaceholder":"{version}","KeyToPath":"guide","Config":[{"Name":"Guide Web API","Version":"v1","Url":null,"Service":{"Name":"guide","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true,"RemoveUnusedComponentsFromScheme":true,"TakeServersFromDownstreamService":false},{"Key":"report","VersionPlaceholder":"{version}","KeyToPath":"report","Config":[{"Name":"Report Web API","Version":"v1","Url":null,"Service":{"Name":"report","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true,"RemoveUnusedComponentsFromScheme":true,"TakeServersFromDownstreamService":false},{"Key":"auth","VersionPlaceholder":"{version}","KeyToPath":"auth","Config":[{"Name":"Auth Web API","Version":"v1","Url":null,"Service":{"Name":"auth","Path":"/swagger/v1/swagger.json"}}],"HostOverride":null,"TransformByOcelotConfig":true,"RemoveUnusedComponentsFromScheme":true,"TakeServersFromDownstreamService":false}]}
9 changes: 4 additions & 5 deletions src/Global/TelephoneDirectory.Saga/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MassTransit;
using MassTransit;
using MassTransit.Saga;
using Microsoft.Extensions.Configuration;
using System;
using System.Threading;
using System.Threading.Tasks;
using TelephoneDirectory.Guide.StateMachines;

namespace TelephoneDirectory.Saga
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Microservices\Guide\TelephoneDirectory.Guide\TelephoneDirectory.Guide.csproj" />
<ProjectReference Include="..\..\Microservices\Csharp\Guide\TelephoneDirectory.Guide\TelephoneDirectory.Guide.csproj" />
</ItemGroup>

</Project>
16 changes: 0 additions & 16 deletions src/Microservices/Auth/TelephoneDirectory.Auth/Dockerfile

This file was deleted.

16 changes: 16 additions & 0 deletions src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
EXPOSE 80

COPY src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/*.csproj src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/
COPY src/Microservices/Csharp/Auth/TelephoneDirectory.Auth.Entities/*.csproj src/Microservices/Csharp/Auth/TelephoneDirectory.Auth.Entities/

RUN dotnet restore src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/*.csproj
COPY . .
RUN dotnet publish src/Microservices/Csharp/Auth/TelephoneDirectory.Auth/*.csproj -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "TelephoneDirectory.Auth.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:56721",
"applicationUrl": "http://localhost:44001",
"sslPort": 0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Issuer": "https://github.com/malikmasis"
},
"ConnectionStrings": {
"DefaultConnection": "Data Source=MALIKNB;Initial Catalog=PhoneAuth;Persist Security Info=True;User ID=admin;Password=Admin!23"
"DefaultConnection": "Data Source=malikmasis;Initial Catalog=PhoneAuth;Persist Security Info=True;User ID=admin;Password=Admin!23"
},
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
Expand Down
17 changes: 17 additions & 0 deletions src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
EXPOSE 80

COPY src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/*.csproj src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/
COPY src/Microservices/Csharp/Guide/TelephoneDirectory.Guide.Entities/*.csproj src/Microservices/Csharp/Guide/TelephoneDirectory.Guide.Entities/
COPY src/Global/TelephoneDirectory.Contracts/*.csproj src/Global/TelephoneDirectory.Contracts/

RUN dotnet restore src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/*.csproj
COPY . .
RUN dotnet publish src/Microservices/Csharp/Guide/TelephoneDirectory.Guide/*.csproj -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "TelephoneDirectory.Guide.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51711",
"applicationUrl": "http://localhost:44337",
"sslPort": 0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Global\TelephoneDirectory.Contracts\TelephoneDirectory.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\Global\TelephoneDirectory.Contracts\TelephoneDirectory.Contracts.csproj" />
<ProjectReference Include="..\TelephoneDirectory.Guide.Entities\TelephoneDirectory.Guide.Entities.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /app
EXPOSE 80
EXPOSE 443

COPY src/Microservices/Csharp/Report/TelephoneDirectory.Report/*.csproj src/Microservices/Csharp/Report/TelephoneDirectory.Report/
COPY src/Microservices/Csharp/Report/TelephoneDirectory.Report.Entities/*.csproj src/Microservices/Csharp/Report/TelephoneDirectory.Report.Entities/
COPY src/Global/TelephoneDirectory.Contracts/*.csproj src/Global/TelephoneDirectory.Contracts/

RUN dotnet restore src/Microservices/Csharp/Report/TelephoneDirectory.Report/*.csproj
COPY . .
RUN dotnet publish src/Microservices/Csharp/Report/TelephoneDirectory.Report/*.csproj -c Release -o out

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "TelephoneDirectory.Report.dll"]