Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Add dockerignore and clean up yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr committed Oct 28, 2022
1 parent e9227bb commit a59bbee
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 71 deletions.
6 changes: 3 additions & 3 deletions k8s/deploy-cosmos-app.yaml → k8s/cosmos-app.yaml
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app: cosmos-todo-app
name: cosmos-todo-app
namespace: cosmosdb
namespace: cosmos-todo
spec:
replicas: 1
selector:
Expand All @@ -30,7 +30,7 @@ spec:
secretKeyRef:
key: Key
name: cosmos-settings
optional: false
optional: true
- name: CosmosDB__DatabaseName
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -60,7 +60,7 @@ apiVersion: v1
kind: Service
metadata:
name: cosmos-todo-service
namespace: cosmosdb
namespace: cosmos-todo
spec:
ports:
- port: 80
Expand Down
51 changes: 0 additions & 51 deletions k8s/cosmos-sql-demo.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions k8s/create_secret.sh

This file was deleted.

8 changes: 8 additions & 0 deletions src/.dockerignore
@@ -0,0 +1,8 @@
# directories
**/bin/
**/obj/
**/out/

# files
Dockerfile*
**/*.md
4 changes: 2 additions & 2 deletions src/Dockerfile
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /source

# copy csproj and restore as distinct layers
Expand All @@ -11,7 +11,7 @@ COPY . .
RUN dotnet publish -c release -o /app --no-restore

# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:3.1
FROM mcr.microsoft.com/dotnet/sdk:6.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "todo.dll"]
1 change: 1 addition & 0 deletions src/Startup.cs
@@ -1,5 +1,6 @@
namespace todo
{
using System;
using System.Threading.Tasks;
using Azure.Identity;
using Microsoft.AspNetCore.Builder;
Expand Down
2 changes: 1 addition & 1 deletion src/appsettings.json
Expand Up @@ -7,7 +7,7 @@
"AllowedHosts": "*",
"CosmosDb": {
"Account": "<Endpoint URI of your Azure Cosmos account>",
"Key": "<PRIMARY KEY of your Azure Cosmos account>",
"Key": "",
"DatabaseName": "Tasks",
"ContainerName": "Item"
}
Expand Down

0 comments on commit a59bbee

Please sign in to comment.