I still admire the ease to deploy Heroku with Java. But since I got some credit on Azure, let me try to make a similar workflow.
I would assume one have an Azure account.
First step, as usual, create a SpringBoot web app. Note the final target might need to be named as
app.jar to be picked by Azure without configure.
One can put the code on GitHub or BitBucket or Azure Repos (I think it comes with Azure DevOps) or else.
I wrote a simple webapp to auto-detect charset of uploaded text file and convert to UTF-8, no database yet.
Second step, on Azure, create Azure Web App. Choose Java SE on Linux platform (ongoing support for Windows). There is a free tier F1 SKU (it is slow, as expected, but free of charge).
This step could also be done as Java code (infrastructure as code) via Azure CLI or Java (among other options).
Create a new Builds Pipeline, select the repository. DevOps would automatically detect the build tool. Choose “Maven package Java project Web App to Linux on Azure” (I would assume similar for Gradle).
Connect with Azure and choose the Web App name created in second step. Review the final YAML configure (it should contains 3 jobs in Build stage, and 1 job in Deploy stage).
And it is done. First build/deploy would be ongoing, and next time code change on master new build/deploy would run automatically.
Code committed to repository would be live in a few minutes.
PS, a few side notes:
- tika-core has the interface, but to detect charset, tika-parsers is required.
- There is still bugs in Azure Pipeline (like status not updated), hence there is comment trigger.