I am trying to deploy a spring boot application to heroku. (Also using a JawsDB MySQL addon). After I push to git, and also to heroku (git push heroku mybranch:master), and build is always successful, I always get an error:
at=error code=H14 desc="No web processes running"
I gather this to mean my Procfile is incorrect. The file name is spelled correctly, it has no extension, and I have stated there:
web: java -jar C:/Users/Myname/Documents/Programming/appFolder/target/*.jar
The above line shows up also in heroku.com/resources -> free Dynos. So the Procfile contents do get picked up.
I searched SO and other places, and came across questions like Heroku SprinBoot Deployment is sucess but Status is 503 Service Unavailable and What to write in the Procfile? and others, but did not find a final and practical answer to my question.
My question is:
1.Which jar am I directing Heroku to? Heroku itself builds the jar, and it does not appear in my appFolder/target. Just some old jar I once manually built through the 'package' command in eclipse. That's also why I wrote *.jar... (in my desperation,) I want him to collect any jar he finds, since I really don't know what the name of it is supposed to be...
And then what would the correct pattern be (back- or forward-slashes? start from C:/?)
And to help me understand the background better:
Am I supposed to build the jar myself? And if so, what good does Heroku's build do?
Where is Heroku's jar stored, if I want to access it?
Thanks in advance.
You can scale up the Dyno formation
heroku ps:scale web=1 -a APP_NAME
Don't use the local path of the jar file but instead the path relative to the project as you push to Heroku:
web: java -Dserver.port=$PORT -jar target/jarName.jar