https://github.com/phronmophobic/pushtoy
A leiningen plugin to help deploy clojure projects to existing servers
https://github.com/phronmophobic/pushtoy
Last synced: over 1 year ago
JSON representation
A leiningen plugin to help deploy clojure projects to existing servers
- Host: GitHub
- URL: https://github.com/phronmophobic/pushtoy
- Owner: phronmophobic
- Created: 2013-09-11T00:46:41.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-12-05T20:39:09.000Z (over 12 years ago)
- Last Synced: 2025-03-29T19:42:14.703Z (over 1 year ago)
- Language: Clojure
- Size: 184 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lein-pushtoy
A Leiningen plugin to make deploying clojure apps to an existing servers simple. Not meant for "production", but great for side projects.
## Usage
### Setup
Put `[lein-pushtoy "0.1.1-SNAPSHOT"]` into the `:plugins` vector of your
`:user` profile.
Add the following key to your project.clj file:
$ :pushtoy {:ips ["" ""]
:user {:username "ubuntu"}]}
Options for your pushtoy config are:
* **:ips** - vector of deployment ip addresses
* **:user** - same keys that are available under pallet.core.user, http://palletops.com/pallet/api/0.8/pallet.core.user.html
`:username` - username for sshing
`:public-key-path` - path string to public key file
`:private-key-path` - path string to private key file
`:public-key` - public key as a string or byte array
`:private-key` - private key as a string or byte array
`:passphrase` - passphrase for private key
`:password` - ssh user password
`:sudo-password` - password for sudo (defaults to :password)
`:sudo-user` - the user to sudo to
`:no-sudo` - flag to not use sudo (e.g. when the user has root privileges).
defaults to username being root and using private and public keys as ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
* **:app-name** - defaults to the name of the project
### Basic Usage
$ lein pushtoy ...
Available commands:
* **install**: installs java, runit, and creates a service for your clojure application
* **deploy**: deploys your uberjar in a location that can be run from runit
* **start**: starts your deployed uberjar using runit
* **stop**: stops your application via runit
* **restart**: restarts your application via runit
### Initial deployment
$ lein do uberjar, pushtoy install deploy restart
### Subsequent deployments
$ lein do uberjar, pushtoy deploy restart
## Todo
- Add example plugin configurations
- Allow options for settings up nginx with virtual hosts
- Integrate vhost stuff with something like http://freedns.afraid.org/
- Integrate with tomcat
- Grace reloading without momentary deployment downtime
## License
Copyright © 2013 Adrian Smith
Distributed under the Eclipse Public License, the same as Clojure.