initi
This commit is contained in:
parent
ca3a702a5f
commit
a62f6c30ea
@ -71,6 +71,15 @@ set :application, 'blog_perso_app'
|
|||||||
|
|
||||||
|
|
||||||
namespace :deploy do
|
namespace :deploy do
|
||||||
|
|
||||||
|
task :reload_nginx do
|
||||||
|
|
||||||
|
sudo "rm -rf /etc/nginx/sites-enabled/#{application}"
|
||||||
|
sudo "ln -s #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application} "
|
||||||
|
|
||||||
|
sudo "service nginx reload"
|
||||||
|
end
|
||||||
|
|
||||||
task :bundle_gems do
|
task :bundle_gems do
|
||||||
run "cd #{release_path} && bundle install"
|
run "cd #{release_path} && bundle install"
|
||||||
end
|
end
|
||||||
@ -80,6 +89,11 @@ set :application, 'blog_perso_app'
|
|||||||
run "ln -s #{deploy_to}shared/storage/private #{release_path}/private_medias"
|
run "ln -s #{deploy_to}shared/storage/private #{release_path}/private_medias"
|
||||||
run "rm -rf #{release_path}/public/public_medias"
|
run "rm -rf #{release_path}/public/public_medias"
|
||||||
run "ln -s #{deploy_to}shared/storage/public #{release_path}/public/public_medias"
|
run "ln -s #{deploy_to}shared/storage/public #{release_path}/public/public_medias"
|
||||||
|
|
||||||
|
sudo "cp #{current_path}/config/unicorn_init_d /etc/init.d/#{application}"
|
||||||
|
|
||||||
|
sudo "chmod +x /etc/init.d/#{application}"
|
||||||
|
sudo "update-rc.d #{application} defaults "
|
||||||
end
|
end
|
||||||
|
|
||||||
task :start do
|
task :start do
|
||||||
|
@ -5,10 +5,10 @@ set -u
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Change these to match your app:
|
# Change these to match your app:
|
||||||
APP_NAME=cs_app
|
APP_NAME=blog_perso_app
|
||||||
APP_RUBY=2.1.2
|
APP_RUBY=2.1.2
|
||||||
APP_ROOT="/home/web/cs_app/current"
|
APP_ROOT="/home/web/blog_perso_app/current"
|
||||||
PID="/home/web/cs_app/shared/unicorn.pid"
|
PID="/home/web/blog_perso_app/shared/tmp/unicorn.pid"
|
||||||
ENV=production
|
ENV=production
|
||||||
|
|
||||||
GEM_HOME="/home/web/.rvm/gems/ruby-$APP_RUBY"
|
GEM_HOME="/home/web/.rvm/gems/ruby-$APP_RUBY"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user