From 0fa9dd85273fed7f5412b9b1be21d8db7c5ed7bb Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 14 Jul 2017 19:13:43 +0900 Subject: Add Rake task for generate VAPID key (#4195) * Add Rake task for generate VAPID key * edit config/initializers/vapid.rb --- lib/tasks/mastodon.rake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 1b05ece33..010139e91 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -184,6 +184,15 @@ namespace :mastodon do end end + namespace :webpush do + desc 'Generate VAPID key' + task generate_vapid_key: :environment do + vapid_key = Webpush.generate_key + puts "VAPID_PRIVATE_KEY=#{vapid_key.private_key}" + puts "VAPID_PUBLIC_KEY=#{vapid_key.public_key}" + end + end + namespace :maintenance do desc 'Update counter caches' task update_counter_caches: :environment do -- cgit