Easy deployment using Docker
$ gem install shipment-deploy
$ ship lash # Setup credentials $ ship this # Prepare application for deployment $ ship out # Deploy application $ ship logs # View logs
What It Does
- Sets up a droplet on DigitalOcean with the proper SSH key
- Creates two Docker containers on the droplet: one for your application, and one for a Postgres database
- Sets up a deploy key for your application's repo on GitHub
- Adds a
.shipmentfile to your project containing application-specific information
- Adds an entry to a global
.shipmentfile in your home directory to keep track of all deployments
- Setup takes between 5 and 10 minutes, depending upon the speed of DigitalOcean
- During setup, green arrows indicate local ouptut, blue arrows indicate commands run on the server, red arrows indicate failed commands and/or connection timeouts, and unmarked output represents stdout on the server.
- Some output is printed in red, even though there is no error. Some server output is being improperly redirected to stderr.
- Currently, the only option is to set up a 2gb droplet in the NYC2 region.
- Currently, the server runs on port 3000.
- Only add
- Handle SSH authorization issues when re-setting up. DigitalOcean
allows adding multiple keys with the same name. Need to delete
existing key locally and remotely when running setup again. (Probably
should either remove
ship setupcommand or do some checking when that command is run.)
- Need to deal with commit limit. Containers need to be exported every once in a while to clean up Aufs layers.
- Save and push application-specific docker images to user's docker account.
- Allow deploying from branches other than master.
- Error handle way better. Need to be able to handle partial setups/deploys.
- Look into creating a base image that already includes ruby and postgres containers. (Requires support from DigitalOcean.)
- Better deal with committing and pushing on
ship this. Right now, rejected pushes would break everything.
- Create simple way to symlink credentials from an
- Fix messy output during setup and deploy. Also, deal with duplicate 'Done.'s when a command is re-run.
- Speed everything up.
- Clean up the classes. Most things are doing way too much.
- Write specs!
- Add cleanup option to remove all system config.
- Fork it ( https://github.com/loganhasson/shipment/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request