I have a Spring-Boot App, that I am hosting on Heroku and is soon going on production. Currently I am using free tier version of Heroku, but will buy standard paid tier before production.
The problem I am facing is that, when packaged with all dependencies the jar size of my App exceeds 200+M.
I have tried two deployment ways (both are functional right now)
1) Using Heroku maven plugin
2) Deploying from Git hub, along with Git-LFS (to host the jar file, as GitHub doesn't allow a file larger than 100mb) and the jar is needed for Heroku.
My Procfile looks like this:
web: java -jar target/x-x-1.1.1.jar
Note: GitHub-LFS free tier also has a limit of 1GB on upload/download per month, so I am right now sticking to Heroku maven build plugin tool (as I have also reached to Git-LFS limit).
In both ways I have to upload around 200+M even if there is a slight change in my source code as it repackaged and then deployed to Heroku.
I don't have much knowledge and expertise about docker, What am I looking right now is a way to deploy using docker and git hub to Heroku without uploading the packaged jar every time, Docker will build the jar file using maven before deployment!
So If some one knows about this or can point to the guide on how to achieve this, It will reduce my deployment time alot!
Spring-Boot version: 2.2.5
Maven-Build-Plugin: 3.1.0