add lets encrypt gem
This commit is contained in:
parent
793e83b9a6
commit
316653bffa
1
Gemfile
1
Gemfile
@ -24,6 +24,7 @@ gem 'whenever', require: false
|
|||||||
# gem "image_processing", "~> 1.2"
|
# gem "image_processing", "~> 1.2"
|
||||||
|
|
||||||
gem "pg"
|
gem "pg"
|
||||||
|
gem 'rails-letsencrypt'
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
||||||
|
15
Gemfile.lock
15
Gemfile.lock
@ -1,6 +1,9 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
acme-client (2.0.10)
|
||||||
|
faraday (>= 1.0, < 3.0.0)
|
||||||
|
faraday-retry (~> 1.0)
|
||||||
actioncable (7.0.2.3)
|
actioncable (7.0.2.3)
|
||||||
actionpack (= 7.0.2.3)
|
actionpack (= 7.0.2.3)
|
||||||
activesupport (= 7.0.2.3)
|
activesupport (= 7.0.2.3)
|
||||||
@ -95,6 +98,11 @@ GEM
|
|||||||
httparty
|
httparty
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
|
faraday (2.2.0)
|
||||||
|
faraday-net_http (~> 2.0)
|
||||||
|
ruby2_keywords (>= 0.0.4)
|
||||||
|
faraday-net_http (2.0.1)
|
||||||
|
faraday-retry (1.0.3)
|
||||||
ffi (1.15.5)
|
ffi (1.15.5)
|
||||||
formatador (1.1.0)
|
formatador (1.1.0)
|
||||||
globalid (1.0.0)
|
globalid (1.0.0)
|
||||||
@ -224,6 +232,10 @@ GEM
|
|||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.2)
|
rails-html-sanitizer (1.4.2)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
|
rails-letsencrypt (0.10.1)
|
||||||
|
acme-client (~> 2.0.0)
|
||||||
|
rails (>= 5.0)
|
||||||
|
redis
|
||||||
railties (7.0.2.3)
|
railties (7.0.2.3)
|
||||||
actionpack (= 7.0.2.3)
|
actionpack (= 7.0.2.3)
|
||||||
activesupport (= 7.0.2.3)
|
activesupport (= 7.0.2.3)
|
||||||
@ -235,6 +247,7 @@ GEM
|
|||||||
rb-fsevent (0.11.1)
|
rb-fsevent (0.11.1)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
|
redis (4.6.0)
|
||||||
regexp_parser (2.2.1)
|
regexp_parser (2.2.1)
|
||||||
reline (0.3.1)
|
reline (0.3.1)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
@ -260,6 +273,7 @@ GEM
|
|||||||
rspec-mocks (~> 3.10)
|
rspec-mocks (~> 3.10)
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.11.0)
|
rspec-support (3.11.0)
|
||||||
|
ruby2_keywords (0.0.5)
|
||||||
ruby_parser (3.18.1)
|
ruby_parser (3.18.1)
|
||||||
sexp_processor (~> 4.16)
|
sexp_processor (~> 4.16)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
@ -332,6 +346,7 @@ DEPENDENCIES
|
|||||||
pg
|
pg
|
||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rails (~> 7.0)
|
rails (~> 7.0)
|
||||||
|
rails-letsencrypt
|
||||||
rspec-rails (~> 5.0.0)
|
rspec-rails (~> 5.0.0)
|
||||||
sassc-rails
|
sassc-rails
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
|
@ -2,4 +2,5 @@ Rails.application.routes.draw do
|
|||||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
||||||
|
|
||||||
# root to: 'high_voltage/pages#show', id: 'index'
|
# root to: 'high_voltage/pages#show', id: 'index'
|
||||||
|
mount LetsEncrypt::Engine => '/.well-known'
|
||||||
end
|
end
|
||||||
|
21
db/migrate/20220409143030_create_letsencrypt_certificates.rb
Normal file
21
db/migrate/20220409143030_create_letsencrypt_certificates.rb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
class CreateLetsencryptCertificates < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :letsencrypt_certificates do |t|
|
||||||
|
t.string :domain
|
||||||
|
t.text :certificate, limit: 65535
|
||||||
|
t.text :intermediaries, limit: 65535
|
||||||
|
t.text :key, limit: 65535
|
||||||
|
t.datetime :expires_at
|
||||||
|
t.datetime :renew_after
|
||||||
|
t.string :verification_path
|
||||||
|
t.string :verification_string
|
||||||
|
|
||||||
|
t.index :domain
|
||||||
|
t.index :renew_after
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
20
db/schema.rb
generated
20
db/schema.rb
generated
@ -10,5 +10,23 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.0].define(version: 0) do
|
ActiveRecord::Schema[7.0].define(version: 2022_04_09_143030) do
|
||||||
|
# These are extensions that must be enabled in order to support this database
|
||||||
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
|
create_table "letsencrypt_certificates", force: :cascade do |t|
|
||||||
|
t.string "domain"
|
||||||
|
t.text "certificate"
|
||||||
|
t.text "intermediaries"
|
||||||
|
t.text "key"
|
||||||
|
t.datetime "expires_at"
|
||||||
|
t.datetime "renew_after"
|
||||||
|
t.string "verification_path"
|
||||||
|
t.string "verification_string"
|
||||||
|
t.datetime "created_at", null: false
|
||||||
|
t.datetime "updated_at", null: false
|
||||||
|
t.index ["domain"], name: "index_letsencrypt_certificates_on_domain"
|
||||||
|
t.index ["renew_after"], name: "index_letsencrypt_certificates_on_renew_after"
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user