A pallet crate to deploy applications



[resolve-method {:keys [instance-id], :as options}]

Deploy an application



[{:as settings} & {:keys [instance-id], :as options}]

Define a server spec for an application.

The deploy phase is defined to deploy the application, either from a lein project, or from artifacts in a maven repository.

To control the application, the server-spec has phases for start, stop and restart, as well as application specific start-, stop- and restart-.

Settings are as described in the settings function.



[& {:keys [action if-flag if-stopped instance-id], :or {action :manage}, :as options}]

Run an application under service management.



[{:keys [app-root runit run-command supervisor user artifacts], :as settings} {:keys [instance-id], :as options}]

Settings for an application.

:app-root : the root of the install location (default /opt)

:artifacts : a sequence of artifact maps. An artifact map is keyed on resolver, with :from-lein and :from-maven-repo resolvers being supported. All resolvers accept a :path, which is the path relative to :app-root or an absolute path, and optionally an :unpack flag, which can be set to unpack an archive. The :from-lein resolver expects a :project-path, a path to a project artifact, which may contain a "%s" which will be substituted with the project version. The :from-maven-repo resolver expects a :coord, which is a leiningen style coordinate vector.

:repositories : a map of leiningen style repository definitions, used by the :from-maven-repo resolver.

:supervision : a keyword selecting the supervision service to be used. Defaults to :runit.

:run-command : a string that can be used as a command to start the application.

:user : the user to use for running the application.