This module helps you deploy your Play! application to dotcloud.
First, install the module from the Play! module repository like so:
play install dotcloud
Tell Play! that you want your application to use the dotcloud module by adding it to your conf/dependencies.yml
file. It might look like this:
require:
- play
- play -> dotcloud 0.3
Now run play dependencies
to install the module into your application. Then, create a dotcloud.yml
file in your application’s conf
directory. The file might look like this:
www:
type: java
db:
type: mysql
For more information, consult the dotcloud documentation.
To push to dotcloud, a deployment name is required. Either give it at the command line (--deployment myapp
) or add it to your application.conf (dotcloud.deployment=myapp
). From the Play! application’s root directory, you may then issue
play dotcloud:deploy
By default, application will be pushed using prod
id. If you want to deploy using a different id, please specify it in your conf/application.conf (dotcloud.id=your_id
).
If you want to use a MySQL database also running on dotcloud, this is the format you need to use for specifying the database connection in your application.conf
file:
%prod.db=mysql
%prod.db.url=jdbc:mysql://(subdomainOfDatabaseService).dotcloud.com:(port)/(databaseName)
%prod.db.driver=com.mysql.jdbc.Driver
%prod.db.user=(username)
%prod.db.pass=(password)
You need to have the dotcloud command line client installed. I only tested this module on Mac OS X — it should work on all platforms supported by Play!, however.
This module only works for applications that contain a single Java service. If your application uses multiple Java services, you need to use the dotcloud CLI. For example, you might have a “frontend” Play! application and a “backend” Play! application on the same dotcloud application, each deployed as its own Java service — these setups are not supported by this module. A single Java service paired with something else like a database service works fine, however.
For more information, consult the documentation in this module’s GitHub repository.
0.1: Initial release during dotcloud beta phase.
0.2: Support for new CLI (0.4.x) after dotcloud beta phase.
0.3: Now properly uses the id specified in application.conf, thanks to Burn0ut07!