Play 2.1 scala app with mongodb deploy to CloudFoundry steps and tips
take a look on these posts:
http://blog.cloudfoundry.com/2012/05/31/cloud-foundry-now-supports-play/
http://aleksandarglavas.blogspot.hu/2013/02/play-21-integration-with-cloudfoundry.html
on Windows: make sure you have ruby DevKit installed properly.
get auto-reconfiguration-0.6.5.jar and play-java-jpa_2.10-2.1.0.jar and place it to the lib folder of application root (create the lib subfolder if needed)
create a new config file, include application.conf and append db conf there:
include "application.conf"
mongodb.uri=${?cloud.services.mongodb.connection.url}
mongodb.password=${?cloud.services.mongodb.connection.password}
mongodb.user=${?cloud.services.mongodb.connection.username}
build the dist package specifying the newly create configuration, the -D option must prepend the name of the dist command.
play -Dconfig.file=conf/dist.cloudfoundry.conf dist
vmc push the app, but don't try to save the configuration. push fails
be happy, you've just spared some hours of agony :)