From fcdea1bcb9b37cd0acefb77aaf5e02757d96b87f Mon Sep 17 00:00:00 2001 From: Rei Date: Sun, 2 Mar 2014 22:54:43 +0800 Subject: [PATCH] Add unicorn.sh and nginx.conf install script; add deploy:restart task --- Vagrantfile | 2 +- config/deploy.rb | 12 +----------- script/setup.sh | 8 ++++++++ 3 files changed, 10 insertions(+), 12 deletions(-) mode change 100755 => 100644 script/setup.sh diff --git a/Vagrantfile b/Vagrantfile index 7b7c57a..30afdb6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -55,7 +55,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # View the documentation for the provider you're using for more # information on available options. - config.vm.provision :shell, :path => "bin/setup.sh" + config.vm.provision :shell, :path => "script/setup.sh" # Enable provisioning with Puppet stand alone. Puppet manifests # are contained in a directory path relative to this Vagrantfile. diff --git a/config/deploy.rb b/config/deploy.rb index c75b2c4..7f96981 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -13,20 +13,10 @@ namespace :deploy do desc 'Restart application' task :restart do on roles(:app), in: :sequence, wait: 5 do - # Your restart mechanism here, for example: - # execute :touch, release_path.join('tmp/restart.txt') + execute :sudo, :service, :unicorn_campo, :restart end end after :publishing, :restart - after :restart, :clear_cache do - on roles(:web), in: :groups, limit: 3, wait: 10 do - # Here we can do anything such as: - # within release_path do - # execute :rake, 'cache:clear' - # end - end - end - end diff --git a/script/setup.sh b/script/setup.sh old mode 100755 new mode 100644 index a86d108..ad2e63f --- a/script/setup.sh +++ b/script/setup.sh @@ -14,6 +14,7 @@ service elasticsearch start su postgres <