Capistrano::LetsEncrypt
Let's encrypt support for Capistrano 3.x
Thanks to @unixcharles and @zealot128 for their libraries,
acme-client and
letsencrypt-cli for managing
part of the workflow to work with Let's encrypt. This library use both to create
a series of capistrano tasks that should help you create certs on your projects
deployed with capistrano
Installation
Add this line to your application's Gemfile:
gem 'capistrano-lets-encrypt'
gem 'capistrano'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-lets-encrypt
Usage
Require in Capfile
to use the default task:
require 'capistrano/lets-encrypt'
You will get the following tasks
cap lets_encrypt:register
cap lets_encrypt:check_certificate
cap lets_encrypt:authorize
cap lets_encrypt:cert
Configurable options (copy into deploy.rb), shown here with examples:
set :lets_encrypt_roles, :lets_encrypt
set :lets_encrypt_user, nil
set :lets_encrypt_test, true
set :lets_encrypt_email, nil
set :lets_encrypt_account_key, "#{fetch(:lets_encrypt_email)}.account_key.pem"
set :lets_encrypt_domains, nil
set :lets_encrypt_challenge_public_path, "#{release_path}/public"
set :lets_encrypt_output_path, "#{shared_path}/ssl/certs"
set :lets_encrypt_local_output_path, "~/certs"
set :lets_encrypt_days_valid, 15
Requirements
This tool needs Ruby >= 2.1 (as the dependency acme-client needs that because of use of keyword arguments).
Contributing
- Fork it
- 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 new Pull Request
Credits
Thank you contributors!
capistrano-lets-encrypt is maintained by platanus.
License
Guides is © 2014 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.