What happens when azure app service receives build artifacts?

CHANG Caleb 1 Reputation point
2022-03-16T16:15:58.047+00:00

After a .jar file is successfully deployed to an instance of azure app service, what does azure app service do with the file? I've see that my .jar file is copied into the wwwroot directory, however, I cannot see the web application running when I go to the site url. Does the app service automatically run the jar file? Do I need to rename the jar file to app.jar? I am using the azure app service deploy task from azure pipelines to deploy the build artifact.

The logs for azure app service say it runs the parking page.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,974 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2022-03-18T21:09:17.987+00:00

    Hi @CHANG Caleb ,

    App Service will automatically run your artifact if it's named app.jar. However, if your deployed app is named something else, you can set Startup Command to java -jar /home/site/wwwroot/myapp.jar under Configuration | General Settings blade. Configure Java Apps provides information on configuration like JAVA_OPTS, troubleshooting, as well as pinning your Java version.

    You already enabled logging on your App Service and not much was revealed. Feel free to post any snippets and OS type for another set of eyes. Another place to check is the Diagnose and solve problems, specifically check Web App Down. Also check the deployment logs for anything that may have gone wrong. For Java, those are logs are at D:\home\LogFiles\Application.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.