Skip to content

Commit

Permalink
Address Wei's Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ellismg committed Nov 22, 2024
1 parent 7e7e128 commit e3823a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/azd/internal/cmd/add/add_configure_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func addServiceAsResource(
if _, err := os.Stat(filepath.Join(svc.RelativePath, "Dockerfile")); errors.Is(err, os.ErrNotExist) {
// default builder always specifies port 80
props.Port = 80
if svc.Language == project.ServiceLanguageJava {
if svc.Language == project.ServiceLanguageJava || svc.Language.IsDotNet() {
props.Port = 8080
}
}
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/internal/repository/app_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestInitializer_prjConfigFromDetect(t *testing.T) {
Type: project.ResourceTypeHostContainerApp,
Name: "dotnet",
Props: project.ContainerAppProps{
Port: 80,
Port: 8080,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/internal/repository/infra_confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func PromptPort(
name string,
svc appdetect.Project) (int, error) {
if svc.Docker == nil || svc.Docker.Path == "" { // using default builder from azd
if svc.Language == appdetect.Java {
if svc.Language == appdetect.Java || svc.Language == appdetect.DotNet {
return 8080, nil
}
return 80, nil
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/internal/repository/infra_confirm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestInitializer_infraSpecFromDetect(t *testing.T) {
Services: []scaffold.ServiceSpec{
{
Name: "dotnet",
Port: 80,
Port: 8080,
Backend: &scaffold.Backend{},
},
},
Expand Down

0 comments on commit e3823a3

Please sign in to comment.