# heroku - helper
Tuto play but outdated (play 1.x)
Play infos ok
# app url
http://desolate-brook-9012.herokuapp.com/
# database config
mysql://<username>:<pwd>@us-cdbr-east-04.cleardb.com/heroku_blablabla
1
Heroku commands to set up env var with user/pwd
heroku config:set PPRB_DB_USER=<username>
heroku config:set PPRB_DB_PWD=<pwd>
1
2
2
# mysql tools config
- stackoverflow.com : remote-connect-to-cleardb-heroku-database to configure mysql tools to reach prod database
# commands
- créer une nouvelle app
heroku create
1
- lister les dyno installées et donner leur statut :
heroku ps
1
marco@debianmarco:~/dev/poc-play-rest-backend$ heroku ps
=== web (1X): `target/start -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=com.mysql.jdbc.Driver -Ddb.default.url=${CLEARDB_DATABASE_URL}`
web.1: crashed 2014/01/10 13:57:53 (~ 8m ago)
1
2
3
2
3
- déployer le code de la branche courante sur heroku. Heroku build l'app sur cette base.
git push heroku master
1
- setter une seule dyno (gratuit)
heroku ps:scale web=1
1
- from the project root dir to get logs from heroku in your play logs dir
heroku logs > logs/heroku.log
1
# common errors
heroku bash: target/start: No such file or directory
heroku <any_command> returns '! App not found' after renaming an app in dashboard
stackoverflow.com : heroku app not found Need to update the remote entry in
project/.git/config
file with the new name !!