This is a re-implementation of the solr service using the custom build API.
git clone git://github.com/jpetazzo/solr-on-dotcloud.git
dotcloud push mysolr solr-on-dotcloud
Copy the solr directory at the top of your code repository. Add the content of this recipe dotcloud.yml file to your dotcloud.yml file.
You can modify solr/config to tweak the solr configuration (for solr experts). You can modify solr/run to tweak the JVM parameters (e.g. if you scale verticall and want to adapt the heap size).
Left as an exercise for the reader.
Hint: this recipe stores solr indexes in ~/data.