Support deploying app without web server#101
Conversation
There was a problem hiding this comment.
Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (2)
- cli/azd/resources/scaffold/templates/resources.bicept: Language not supported
- schemas/alpha/azure.yaml.json: Language not supported
Comments suppressed due to low confidence (1)
cli/azd/internal/appdetect/spring_boot.go:485
- [nitpick] The function name 'detectDependencyAboutEmbeddedWebServer' is verbose. Consider renaming it to 'detectEmbeddedWebServerDependency' for conciseness.
func detectDependencyAboutEmbeddedWebServer(azdProject *Project, springBootProject *SpringBootProject) {
|
Please ignore the GitHub action failure: It will be fixed in this PR: #99 |
| } | ||
|
|
||
| func getJavaApplicationPort(svc appdetect.Project) int { | ||
| if svc.Metadata.ContainsDependencySpringCloudEurekaServer { |
There was a problem hiding this comment.
Is it possible that users change the port number using properties?
| ContainsDependencySpringCloudEurekaServer: true, | ||
| }, | ||
| }, | ||
| expected: 8080, |
There was a problem hiding this comment.
FYI: For eureka server, of not configured in application.properties, the default port is 8080;
Refs: https://docs.spring.io/spring-cloud-netflix/docs/current/reference/html/#spring-cloud-eureka-server-standalone-mode
There was a problem hiding this comment.
Agree that, but I'm worries about we cannot make the current spring-petclinic-microservices work well, because we set the port as default 8080 when server.port not configured. but for the eureka server, it sets this property server.port:8761 in the remote config file, so it cannot be aware of this info until starts up, then it will use 8761, but we listen on 8080, right?
There was a problem hiding this comment.
it sets this property server.port:8761 in the remote config file, so it cannot be aware of this info until starts up, then it will use 8761, but we listen on 8080, right?
Good point.
I think we can enhance the property resolver in SJAD. ADO item created: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2332275
BTW, where is the CONFIG_SERVER_URL set the the spring-petclinic-microservices sample? https://github.com/azure-javaee/spring-petclinic-microservices/blob/14dcdc2379eb843d3a9cfe7748987e4d03beaa0d/spring-petclinic-discovery-server/src/main/resources/application.yml#L5C37-L5C54
There was a problem hiding this comment.
The CONFIG_SERVER_URL will be configured as the Env Var for the config client services.
| ContainsDependencySpringCloudConfigServer: true, | ||
| }, | ||
| }, | ||
| expected: 8080, |
There was a problem hiding this comment.
Same here.
Refs: https://docs.spring.io/spring-cloud-config/reference/server.html
…is no port specified in Dockerfile.
…n-deploy-non-web-app-to-aca
There was a problem hiding this comment.
Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (6)
- cli/azd/resources/scaffold/templates/resources.bicept: Language not supported
- schemas/alpha/azure.yaml.json: Language not supported
- cli/azd/internal/appdetect/appdetect.go: Evaluated as low risk
- cli/azd/internal/appdetect/appdetect_test.go: Evaluated as low risk
- cli/azd/.vscode/cspell.yaml: Evaluated as low risk
- cli/azd/internal/repository/app_init_test.go: Evaluated as low risk
Comments suppressed due to low confidence (2)
cli/azd/pkg/project/scaffold_gen.go:401
- The error message formatting is slightly off. It should be: return fmt.Errorf("port value for '%s' must be between 0 and 65535 (port = 0 means ingress disabled), but it's %d", resourceConfig.Name, port)
return fmt.Errorf("port value for '%s' must be between 0 and 65535 (port = 0 means ingress disabled), "+"but it's %d ", resourceConfig.Name, port)
cli/azd/internal/repository/infra_confirm.go:341
- The function
promptPortNumberis no longer used and should be removed to avoid dead code.
func promptPortNumber(console input.Console, ctx context.Context, promptMessage string) (int, error) {
|
Hi, @saragluna , @haoozhang |





Support deploying app without web server