Skip to content

Instantly share code, notes, and snippets.

Avatar

Markus Herkommer screamingworld

View GitHub Profile
@screamingworld
screamingworld / variables.csv
Created Mar 1, 2021
Notifier - web api variables
View variables.csv
Name Value Scope
DOMAIN_URL_BASE_NAME notifier.com Release
DOMAIN_URL_SUFFIX -acc acc
DOMAIN_URL_SUFFIX -prd prd
ENVIRONMENT acc acc
ENVIRONMENT prd prd
RELEASE_ARTIFACTS_BUILD_NOTIFIER_BUILDID $(Build.BuildId) Release
ApplicationInsights__InstrumentationKey $(ApplicationInsights — InstrumentationKey) Release
EventHubSettings__ConnectionString $(EventHubSettings — ConnectionString) Release
StorageSettings__ConnectionString $(StorageSettings — ConnectionString) Release
@screamingworld
screamingworld / azure-pipeline.yaml
Created Mar 1, 2021
Notifier - web api pipeline 3
View azure-pipeline.yaml
steps:
- checkout: self
- checkout: Common
- task: Docker@1
displayName: Build Image ACC
inputs:
containerregistrytype: $(ContainerRegistryType)
azureSubscriptionEndpoint: $(ServiceConnectionEndpoint)
azureContainerRegistry: 'notifiercontainerregistryacc.azurecr.io'
command: 'Build an image'
@screamingworld
screamingworld / azure-pipeline.yaml
Last active Mar 1, 2021
Notifier - web api pipeline 2
View azure-pipeline.yaml
trigger:
branches:
include:
- master
resources:
repositories:
- repository: self
- repository: Common
type: git
@screamingworld
screamingworld / azure-pipeline.yaml
Created Mar 1, 2021
Notifier - web api pipeline 1
View azure-pipeline.yaml
trigger:
- master
resources:
repositories:
- repository: self
pool:
vmImage: 'ubuntu-latest'
@screamingworld
screamingworld / ingress.yaml
Created Feb 28, 2021
Notifier - k8s web api ingress
View ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: notifier-webapi-ingress
labels:
area: Notifier
component: WebApi
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
@screamingworld
screamingworld / service.yaml
Created Feb 28, 2021
Notifier - k8s web api service
View service.yaml
apiVersion: v1
kind: Service
metadata:
name: notifier-webapi
labels:
area: Notifier
component: WebApi
spec:
ports:
- port: 8080
@screamingworld
screamingworld / deployment.yaml
Created Feb 28, 2021
Notifier - k8s web api deplyoment
View deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: notifier-webapi
labels:
area: Notifier
component: WebApi
spec:
replicas: 1
selector:
@screamingworld
screamingworld / secrets.yaml
Created Feb 28, 2021
Notifier - k8s secrets
View secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: notifier-webapi-secret
type: Opaque
stringData:
ApplicationInsights__InstrumentationKey: '#{ApplicationInsights__InstrumentationKey}#'
StorageSettings__ConnectionString: '#{StorageSettings__ConnectionString}#'
EventHubSettings__ConnectionString: '#{EventHubSettings__ConnectionString}#'
@screamingworld
screamingworld / config.yaml
Created Feb 28, 2021
Notifier - k8s config
View config.yaml
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}#'
@screamingworld
screamingworld / Dockerfile
Last active Feb 28, 2021
Notifier Web Api - Dockerfile
View Dockerfile
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"