diff --git a/config/deploy.rb b/config/deploy.rb index 40e3ef6..8122a26 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -8,7 +8,7 @@ set :repo_url, 'git@github.com:danbee/danbarberphoto.git' # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp # Default deploy_to directory is /var/www/my_app_name -set :deploy_to, '/var/apps/danbarberphoto' +set :deploy_to, '~/apps/danbarberphoto' # Default value for :scm is :git # set :scm, :git @@ -35,7 +35,7 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', ' # set :keep_releases, 5 # set :rbenv_type, :user -set :rbenv_ruby, '2.2.1' +set :rbenv_ruby, '2.2.2' namespace :deploy do @@ -51,34 +51,10 @@ namespace :deploy do end namespace :foreman do - desc 'Export the Procfile to Debian systemd scripts' - task :export do - on roles(:app) do |host| - log_path = shared_path.join('log') - environment_path = fetch(:foreman_env) - within release_path do - as :root do - execute :sudo, "foreman export initscript /etc/init.d/ -a #{fetch(:application)} -u #{host.user} -l #{log_path} -e #{environment_path}" - end - end - end - end - desc 'Start the application services' task :start do on roles(:app) do |host| - as :root do - execute :start, fetch(:application) - end - end - end - - desc 'Stop the application services' - task :stop do - on roles(:app) do |host| - as :root do - execute :stop, fetch(:application) - end + execute :foreman, :start end end diff --git a/config/deploy/production.rb b/config/deploy/production.rb index b2a6f58..4b12ba7 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -7,7 +7,7 @@ # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value # server 'db.example.com', user: 'deploy', roles: %w{db} -server 'vps2.danbee.co.uk', user: 'danbarberphoto', roles: %w{app db web} +server 'vps2.danbee.co.uk', user: 'danbarber', roles: %w{app db web}