Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Update port from 8081 to 8080 #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schemaVersion: 2.2.0
metadata:
name: dotnet-basic
displayName: Basic .NET
version: 1.1.1
version: 2.0.0
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
Expand Down Expand Up @@ -49,19 +49,19 @@ components:
deployment/replicas: 1
deployment/cpuRequest: 10m
deployment/memoryRequest: 100Mi
deployment/container-port: 8081
deployment/container-port: 8080
kubernetes:
uri: kubernetes/deployment.yaml
endpoints:
- name: http-8081
targetPort: 8081
- name: k8s-http-8080
targetPort: 8080
path: /
- name: kubernetes-service
attributes:
deployment/replicas: 1
deployment/cpuRequest: 10m
deployment/memoryRequest: 100Mi
deployment/container-port: 8081
deployment/container-port: 8080
kubernetes:
uri: kubernetes/service.yaml
commands:
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ RUN dotnet publish -c Release


FROM registry.access.redhat.com/ubi8/dotnet-60:6.0-32.20230511125009
EXPOSE 8081
ENV ASPNETCORE_URLS=http://*:8081
EXPOSE 8080
ENV ASPNETCORE_URLS=http://*:8080
COPY --from=builder /opt/app-root/src/bin /opt/app-root/src/bin
WORKDIR /opt/app-root/src/bin/Release/net6.0/publish
CMD ["dotnet", "app.dll"]
2 changes: 1 addition & 1 deletion kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
imagePullPolicy: Always
ports:
- name: http
containerPort: 8081
containerPort: 8080
protocol: TCP
resources:
requests:
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
name: devfile-dotnet-deploy
spec:
ports:
- name: http-8081
port: 8081
- name: http-8080
port: 8080
protocol: TCP
targetPort: 8081
targetPort: 8080
selector:
app: devfile-dotnet-deploy
type: LoadBalancer
Expand Down