This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: notifier-webapi | |
labels: | |
area: Notifier | |
component: WebApi | |
spec: | |
ports: | |
- port: 8080 |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: notifier-webapi | |
labels: | |
area: Notifier | |
component: WebApi | |
spec: | |
replicas: 1 | |
selector: |
This file contains 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: notifier-webapi-secret | |
type: Opaque | |
stringData: | |
ApplicationInsights__InstrumentationKey: '#{ApplicationInsights__InstrumentationKey}#' | |
StorageSettings__ConnectionString: '#{StorageSettings__ConnectionString}#' | |
EventHubSettings__ConnectionString: '#{EventHubSettings__ConnectionString}#' |
This file contains 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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: notifier-webapi-config | |
labels: | |
area: Notifier | |
component: WebApi | |
data: | |
CorsOptions__AllowedOrigins: 'https://notifier-webapi#{DOMAIN_URL_SUFFIX}#.#{DOMAIN_URL_BASE_NAME}#' |
This file contains 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
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS base | |
WORKDIR /app | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
WORKDIR /src | |
COPY ["./WebApi/Notifier.WebApi/Notifier.WebApi.csproj", "src/WebApi/Notifier.WebApi/"] | |
COPY ["./Common/Notifier.Common/Notifier.Common.csproj", "src/Common/Notifier.Common/"] | |
RUN dotnet restore "src/WebApi/Notifier.WebApi/Notifier.WebApi.csproj" | |
COPY . . | |
WORKDIR "/src/WebApi/Notifier.WebApi" |
This file contains 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
GET http://localhost:8080/api/notifications | |
### | |
POST http://localhost:8080/api/notifications?message=hello this is my message |
This file contains 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
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Newtonsoft.Json.Converters; | |
using Notifier.Common.Extensions; | |
using Notifier.Common.Settings; | |
using Notifier.WebApi.Common.Data; | |
using Notifier.WebApi.Common.Data.Entities; |
This file contains 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
using System.Net; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.Extensions.Logging.ApplicationInsights; | |
using Notifier.Common.Extensions; | |
using Notifier.Common.Settings; |
This file contains 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
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Routing; | |
using Microsoft.Extensions.Logging; | |
using Notifier.WebApi.Models; | |
using Notifier.WebApi.Services; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Notifier.WebApi.Controllers | |
{ |
This file contains 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
using Google.Protobuf; | |
using Microsoft.Azure.EventHubs; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.Extensions.Options; | |
using Notifier.Common; | |
using Notifier.Common.Settings; | |
using Notifier.WebApi.Common.Data; | |
using Notifier.WebApi.Common.Data.Entities; | |
using Notifier.WebApi.Models; | |
using System; |