highwaybobbery / puma-redeploy

Puma plugin to redeploy and reload app from artifact

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Puma Redeploy

The puma-redeploy gem is a puma plugin that allows you to redeploy a new version of your Ruby application in a container without a full container deploy.

Key Points:

  • Encourages the separation of the build process from deployment
  • Leverages Puma phased-restart to ensure uptime deploy
  • Deploys in seconds

image

Example application can be found here

Installation

Add this line to your application's Gemfile:

gem 'puma-redeploy'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install puma-redeploy

Usage

Update your config/puma.rb config file with the following


# Add the puma-redeploy plugin
plugin :redeploy

# specify the redeploy watch file
redeploy_watch_file './watch_me'

# Specify the number of seconds between checking watch file. Defaults to 30.
redeploy_watch_delay 15

The watch file must contain the path to the current archive. For example:

/sinatra_test/pkg/my_application_0.0.1.zip

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run the following. Note - You must add any new files to git first.

bundle exec rake install
puma-redeploy 0.1.0 built to pkg/puma-redeploy-0.1.0.gem.
puma-redeploy (0.1.0) installed.

To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/puma-redeploy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Puma::Redeploy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

Puma plugin to redeploy and reload app from artifact

License:MIT License


Languages

Language:Ruby 100.0%