Que inits script sudo friendly, pid files moved to tmp/pids #2724

This commit is contained in:
Priit Tark 2015-07-16 18:42:49 +03:00
parent 9d22212acd
commit 463df1f406
4 changed files with 31 additions and 17 deletions

View file

@ -138,7 +138,8 @@ set :shared_paths, [
'public/system',
'export/zonefiles',
'import/bank_statements',
'import/legal_documents'
'import/legal_documents',
'tmp/pids'
]
# Optional settings:
@ -180,6 +181,9 @@ task setup: :environment do
queue! %(mkdir -p "#{deploy_to}/shared/import/legal_documents")
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/import/legal_documents")
queue! %(mkdir -p "#{deploy_to}/shared/tmp/pids")
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/tmp/pids")
queue! %(touch "#{deploy_to}/shared/config/database.yml")
deploy do
invoke :'git:clone'
@ -199,6 +203,11 @@ task deploy: :environment do
# instance of your project.
invoke :'git:clone'
invoke :load_commit_hash
# TEMP until all servers are updated
queue! %(mkdir -p "#{deploy_to}/shared/tmp/pids")
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/tmp/pids")
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate'