I try to create simple java App on Heroku. I following step by step from http://samuelsharaf.wordpress.com/2011/11/06/create-a-simple-java-web-app-using-maven-and-upload-to-hero
If you are using a container to build a web application, create a heroku.yaml
file like this in your project's root:
build:
docker:
web: Dockerfile
run:
web: [PUT YOUR CMD COMMAND IN DOCKERFILE HERE]
Then add heroku.yaml
to git repository. You can remove Procfile
(optional). Finally deploy your repository as the following:
git add .
git commit -m "Add heroku.yml"
heroku stack:set container -a [YOUR APP NAME]
git push heroku master
If your are pushing to heroku for the first time, you should run heroku git:remote -a [YOUR APP NAME]
before git push heroku master