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

dapr tutorial port fix #926

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

willtsai
Copy link
Contributor

@willtsai willtsai commented Nov 3, 2023

Thank you for helping make the Radius documentation better!

Please follow this checklist before submitting:

  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within codetabs
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

add env var to override the default port 80 that the .NET frontend app uses to 8080 instead, since port 80 is problematic for localhost testing.

Auto-generated description

🤖 Generated by Copilot at faaadf2

Summary

🚀🛠️📝

Updated the bicep template for the .NET Core web app to use a different port than the Dapr sidecar. This change supports the tutorial-dapr scenario.

appSettings changed
Dapr sidecar needs port five
Autumn tutorial

Walkthrough

  • Override the default port for .NET Core web app to avoid conflict with Dapr sidecar (link)

Issue reference

Fixes: #916

Signed-off-by: Will Tsai <[email protected]>
@willtsai
Copy link
Contributor Author

willtsai commented Nov 3, 2023

@@ -59,6 +59,8 @@ resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
env: {
// An environment variable to tell the frontend container where to find the backend
CONNECTION_BACKEND_APPID: 'backend'
// An environment variable to override the default port that .NET Core listens on
ASPNETCORE_URLS: 'http://*:8080'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it only serve through HTTP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ytimocin -- not sure, but http is the relevant protocol for our tutorial, so I think this should be okay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need HTTP for the tutorial. .NET does both (even in development scenarios).

@willtsai willtsai merged commit 5cc76c6 into v0.26 Nov 3, 2023
9 of 10 checks passed
@willtsai willtsai deleted the willtsai/dapr-tutorial-networking-fixes branch November 3, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontend containerPort 8080 is not working and 80 is working in "Tutorial: Dapr Microservices"
4 participants