Skip to content

Leiningen plugin providing runit integration, a UNIX init scheme with service supervision.

License

Notifications You must be signed in to change notification settings

danielsz/lein-runit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lein-runit

A Leiningen plugin that makes easy to deploy production code with the runit supervisor. If you’ve never used runit before, you may want to refer to Kevin Chard’s excellent quickstart. I have curated some more links in a blog post. Once you understand how things work, you may want to come back and use lein-runit to automate the workflow for Clojure projects.

Installation

Put the following into the :plugins vector in either project.clj or ~/.lein/profiles.clj.

[org.danielsz/lein-runit "0.1.0-SNAPSHOT"]

Usage

Define a :runit vector in your project.clj with the paths to your application root and service root paths. On debian, for example:

:runit {:app-root "/opt"
        :service-root "/etc/sv"}

Since this plugin makes sense for production scenarii, this is most likely what you’ll want to issue at the command line:

$ lein with-profile production runit

Finally, change to the target directory, and run the shell script that will move everything into place with the right permissions:

$ cd target
$ ./commit.sh

Assumptions

The assumptions made by lein-runit are that:

  • You are using the environ library to set the environment variables for your project.
  • You are deploying an uberjar. (lein with-profile production uberjar)

License

Copyright © 2014 Daniel Szmulewicz

Distributed under the Eclipse Public License.

About

Leiningen plugin providing runit integration, a UNIX init scheme with service supervision.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published