Skip to content

Instantly share code, notes, and snippets.

View fredrkl's full-sized avatar

Fredrik Klingenberg fredrkl

View GitHub Profile
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
prometheus: basic_rules_prom
role: alert-rules
name: application-basic-pack
namespace: prometheus-platform-instances
spec:
groups:
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment # Name of our deployment
labels:
app: nginx
spec:
replicas: 3
Selector:
matchLabels:
docker run -it --name teamcity-server-instance \
-v <path to data directory>:/data/teamcity_server/datadir \
-v <path to logs directory>:/opt/teamcity/logs \
-p <port on host>:8111 \
jetbrains/teamcity-server
FROM microsoft/dotnet:2.0.3-sdk AS build
LABEL maintainer="themaintainer@themaintainer.com"
WORKDIR /app
COPY . .
RUN dotnet restore ./IdentityServer.csproj \
&& dotnet publish ./IdentityServer.csproj -o ./out -c Release
FROM microsoft/aspnetcore:2.0.5
WORKDIR /app
COPY --from=build /app/out .
apiVersion: apps/v1
kind: Deployment
metadata:
name: someapp
spec:
replicas: 1
selector:
matchLabels:
app: someapp
template:
FROM debian:stretch-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
\
# .NET Core dependencies
libc6 \
libgcc1 \
libgssapi-krb5-2 \
ROM microsoft/dotnet:2.1-runtime-deps-stretch-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install ASP.NET Core
ENV ASPNETCORE_VERSION 2.1.5
FROM microsoft/dotnet:2.1-sdk AS build
LABEL maintainer="theMaintainer@theMaintainer.io"
WORKDIR /applicationfolder
COPY . .
RUN dotnet restore ./app/app.csproj \
&& dotnet publish ./app/app.csproj -o ./out -c Release
FROM microsoft/dotnet:2.1-aspnetcore-runtime
WORKDIR /app
COPY --from=build /applicationfolder/app/out .