From 24f74daa2ea90fe93f42e4cf017523fa6e4664d5 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Wed, 5 Feb 2020 13:49:49 +0100 Subject: [PATCH] Moved sphinx service handling to systemd --- config/deploy.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index 96d9542ee..0eaa28312 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -42,6 +42,7 @@ queue! %[wget 'http://sphinxsearch.com/files/dicts/en.pak' -O "#{deploy_to}/shared/en.pak"] queue! %[zypper --non-interactive ar -f https://download.opensuse.org/repositories/openSUSE:/infrastructure:/hackweek/SLE_15/openSUSE:infrastructure:hackweek.repo] queue! %[zypper --non-interactive in hackweek-service] + queue! %[systemctl enable hackweek-sphinx] queue! %[systemctl enable hackweek] queue! %[systemctl enable searchd] queue! %[chown hwrun:hwrun -R "#{deploy_to}/shared"] @@ -56,9 +57,9 @@ invoke :'rails:db_migrate' invoke :'rails:assets_precompile' invoke :chown - invoke :sphinx_restart to :launch do + queue "sudo systemctl restart hackweek-sphinx" queue "sudo systemctl restart hackweek" queue "sudo systemctl restart apache2" end @@ -68,8 +69,3 @@ task :chown do queue "cd #{deploy_to!}/#{current_path!} && chown hwrun:hwrun -R ." end - -desc "Restart Sphinx." -task :sphinx_restart do - queue "cd #{deploy_to!}/#{current_path!} && RAILS_ENV=#{rails_env} bundle exec rake ts:rebuild" -end