This plugin is used to deploy Clojure applications directly to Heroku without pushing to a Git repository. This is can be useful when deploying from a CI server or when the Leiningen build is complex.
heroku-lein
is deprecated and no longer under active development. Existing setups using this plugin will continue to work for the forseeable future. However, we advise customers to migrate to a another deployment mechanism since this plugin will not be updated to include security fixes, support for more recent Java/Clojure versions or new features.
Customers that require deployment of pre-built uberjars can use the Heroku Java CLI plugin.
For more information about the deployment of Clojure applications on Heroku, see Deploying Clojure Apps on Heroku on DevCenter.
- Your application must be built as an uberjar.
- You must use Java 1.7 or higher locally.
Add the following to your project.clj
file's :plugins
vector:
If you do not have a Heroku Git repo in your git remote
, add something like this to your project.clj
:
:heroku {:app-name "your-heroku-app-name"}
Now, if you have the Heroku Toolbelt installed, run:
$ lein heroku deploy
If you do not have the toolbelt installed, then run:
$ HEROKU_API_KEY="xxx-xxx-xxxx" lein heroku deploy
And replace "xxx-xxx-xxxx" with the value of your Heroku API token.
You may set a :heroku
element in your project.clj
like so:
:heroku {
:app-name "your-heroku-app-name"
:jdk-version "1.8"
:include-files ["target/myapp.jar"]
:process-types { "web" "java -jar target/myapp.jar" }}
By default, the plugin will include the target
directory.
Source Copyright © 2015 Heroku. Distributed under the Eclipse Public License, the same as Clojure uses. See the file COPYING.