Skip to content

Commit

Permalink
kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlonHeiber committed Oct 3, 2021
1 parent a1f33e2 commit a51e4ce
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile → ConversaoPeso.Web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY ../engine/examples ./
COPY * ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:3.1
WORKDIR /app
COPY --from=build-env /app/out .
EXPOSE 8080
ENTRYPOINT ["dotnet", "aspnetapp.dll"]
34 changes: 34 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#Deplyment app
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: marlonheiber/conversao-peso:v1
ports:
- containerPort: 8080
---
#Service app
apiVersion: v1
kind: Service
metadata:
name: web
spec:
selector:
app: web
ports:
- port: 80
targetPort: 8080
nodePort: 30000
type: NodePort

0 comments on commit a51e4ce

Please sign in to comment.