Skip to content

Commit

Permalink
Create daphne service and restart it in capistrano
Browse files Browse the repository at this point in the history
  • Loading branch information
Théo Vuilliomenet committed Apr 27, 2023
1 parent 6b47fa4 commit 42d4374
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/deploy/apps/api/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@
execute :sudo, 'systemctl restart gunicorn'
end
end
end

after 'gunicorn:restart', 'gunicorn:websocket'

namespace :gunicorn do
desc 'Launch asgi server for websocket'
task :websocket do
on roles(:web) do |h|
execute :sudo, 'systemctl restart daphne.service'
end
end
end

0 comments on commit 42d4374

Please sign in to comment.