{"id":16796458,"url":"https://github.com/tcchawla/javaazureapp","last_synced_at":"2025-03-17T03:43:02.504Z","repository":{"id":178735042,"uuid":"662283811","full_name":"tcchawla/javaazureapp","owner":"tcchawla","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-04T19:46:07.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T16:17:22.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcchawla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-04T19:19:35.000Z","updated_at":"2023-07-04T19:37:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"4eec738e-ef55-4076-91ca-9f4cb6191cab","html_url":"https://github.com/tcchawla/javaazureapp","commit_stats":null,"previous_names":["tcchawla/javaazureapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcchawla%2Fjavaazureapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcchawla%2Fjavaazureapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcchawla%2Fjavaazureapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcchawla%2Fjavaazureapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcchawla","download_url":"https://codeload.github.com/tcchawla/javaazureapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971157,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:19:15.418Z","updated_at":"2025-03-17T03:43:02.482Z","avatar_url":"https://github.com/tcchawla.png","language":"Java","readme":"# A Simple Java Web App for Azure\n\n## Build\n```shell\nmvn package\n```\n\n## Run Locally\n```shell\nmvn jetty:run\n```\nTo run in a different port\n```shell\nmvn jetty:run -Djetty.port=\u003cyour port\u003e\n```\n\n## Debug Locally\n```shell\nset MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n\nmvn jetty:run\n```\n\n## Deploy to Azure Web App using FTP\nRename the `.war` file in `target` folder to `ROOT.war` and upload it to your Azure Web App through Git or FTP.\n\n## Containerize Your Web App\n1. Build a docker image using `Dockerfile`:\n   ```\n   docker build -t calculator .\n   ```\n2. Run docker image locally\n   ```\n   docker run --rm -p 8080:8080 calculator\n   ```\n3. Then you can access the web app at http://localhost:8080 in browser\n\n## Deploy to Azure Web App using Container Image\n1. Create a Container Registry on Azure\n2. Push your local image to ACR:\n   ```\n   docker login -u \u003cclient id\u003e -p \u003cclient secret\u003e \u003cyour ACR server\u003e\n   docker tag calculator \u003cyour ACR server\u003e/calculator\n   docker push \u003cyour ACR server\u003e/calculator\n   ```\n3. Create a Web App in Linux on Azure\n4. In Docker Container settings of Web App, fill in image name, server URL, username and password of your ACR.\n5. Save the changes and you'll be able to access the web app in a few seconds.\n\n## Setup Continous Integration with Azure using Jenkins\n1. Go to Settings -\u003e Integration \u0026 services, click Add service, choose Jenkins (GitHub plugin), fill in Jenkins hook url with `http://\u003cyour jenkins server\u003e/github-webhook/`\n2. Make sure your Jenkins has the following components installed:\n   * JDK\n   * Maven\n   * Docker\n   \n   And the following plugins installed:\n   * Azure credentials\n   * Docker pipeline\n   * Credentials binding\n4. To deploy using FTP, create a Jenkins pipeline with `Jenkinsfile` as pipeline file.\n5. To deploy using container, create a Jenkins pipeline with `Jenkinsfile2` as pipeline file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcchawla%2Fjavaazureapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcchawla%2Fjavaazureapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcchawla%2Fjavaazureapp/lists"}