An example Java application that deploys an already-existing WAR file.
This is an extension of the Java Tomcat example with a few minor tweaks to show how to work with WAR and JAR files that require customized build processes which do not fit nicely into the buildpack model.
The simple-jar
and simple-war
directories under source-projects
are included here to show the (simplistic) source of the artifacts used by default in this demo. You can safely ignore them; the deployment method used here does not require you to keep the source code of your application in a Git repository.
If you haven't already read Datica's Java + Maven Guide please check it out. Also, the Heroku Java documentation and Heroku Java Buildpack project and are also good references which are mostly relevant when running Java applications on Datica.
- Clone this repository.
- Customize the
.datica/post-build
script to pull down your pre-built software artifacts. We recommend using S3 in conjunction with access keys credentials if you need to protect those artifacts from public access. - Update the
Procfile
command as appropriate. By default it uses the webapp runner to start up a Tomcat instance for serving up a WAR file. - Commit your customizations to your local Git repository.
- Use the datica git-remote add command to associate your customized repo to a service in your Datica environment.
- Push your modified branch to your service using the
git
command (usuallygit push datica master
). - Grab some coffee while your build finishes and your new application is deployed for you automatically.
As always, feel free to reach out to Datica's support team if you run into any trouble.