Merge pull request #6031 from betagouv/fix_deployment
Répare le déploiement (maj mimemagic et test du fichier i_am_a_webserver)
This commit is contained in:
commit
edbb5c325d
2 changed files with 10 additions and 6 deletions
|
@ -199,9 +199,6 @@ GEM
|
||||||
database_cleaner-core (2.0.1)
|
database_cleaner-core (2.0.1)
|
||||||
datetime_picker_rails (0.0.7)
|
datetime_picker_rails (0.0.7)
|
||||||
momentjs-rails (>= 2.8.1)
|
momentjs-rails (>= 2.8.1)
|
||||||
debase (2.3.2)
|
|
||||||
debase-ruby_core_source (~> 0.10.11)
|
|
||||||
debase-ruby_core_source (0.10.12)
|
|
||||||
deep_cloneable (3.0.0)
|
deep_cloneable (3.0.0)
|
||||||
activerecord (>= 3.1.0, < 7)
|
activerecord (>= 3.1.0, < 7)
|
||||||
delayed_cron_job (0.7.4)
|
delayed_cron_job (0.7.4)
|
||||||
|
@ -421,7 +418,9 @@ GEM
|
||||||
mime-types (3.3.1)
|
mime-types (3.3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2021.0212)
|
mime-types-data (3.2021.0212)
|
||||||
mimemagic (0.3.5)
|
mimemagic (0.3.10)
|
||||||
|
nokogiri (~> 1)
|
||||||
|
rake
|
||||||
mini_magick (4.11.0)
|
mini_magick (4.11.0)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
mini_portile2 (2.5.0)
|
mini_portile2 (2.5.0)
|
||||||
|
|
|
@ -4,6 +4,7 @@ require 'mina/rails'
|
||||||
require 'mina/rbenv'
|
require 'mina/rbenv'
|
||||||
|
|
||||||
SHARED_WORKER_FILE_NAME = 'i_am_a_worker'
|
SHARED_WORKER_FILE_NAME = 'i_am_a_worker'
|
||||||
|
SHARED_WEBSERVER_FILE_NAME = 'i_am_a_webserver'
|
||||||
# Basic settings:
|
# Basic settings:
|
||||||
# domain - The hostname to SSH to.
|
# domain - The hostname to SSH to.
|
||||||
# deploy_to - Path to deploy into.
|
# deploy_to - Path to deploy into.
|
||||||
|
@ -80,17 +81,21 @@ end
|
||||||
namespace :service do
|
namespace :service do
|
||||||
desc "Restart puma"
|
desc "Restart puma"
|
||||||
task :restart_puma do
|
task :restart_puma do
|
||||||
|
webserver_file_path = File.join(deploy_to, 'shared', SHARED_WEBSERVER_FILE_NAME)
|
||||||
|
|
||||||
command %{
|
command %{
|
||||||
echo "-----> Restarting puma service"
|
echo "-----> Restarting puma service"
|
||||||
#{echo_cmd %[sudo systemctl restart puma]}
|
#{echo_cmd %[test -f #{webserver_file_path} && sudo systemctl restart puma]}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Reload nginx"
|
desc "Reload nginx"
|
||||||
task :reload_nginx do
|
task :reload_nginx do
|
||||||
|
webserver_file_path = File.join(deploy_to, 'shared', SHARED_WEBSERVER_FILE_NAME)
|
||||||
|
|
||||||
command %{
|
command %{
|
||||||
echo "-----> Reloading nginx service"
|
echo "-----> Reloading nginx service"
|
||||||
#{echo_cmd %[sudo systemctl reload nginx]}
|
#{echo_cmd %[test -f #{webserver_file_path} && sudo systemctl reload nginx]}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue