I am working on deploying my app with Capistrano, and my deploy ran successfully after first cap production deploy, skipping all the errors, migrations and missing gems.
INFO [b6487eaf] Finished in 0.329 seconds with exit status 0 (successful).
Of course the server isn't working because I have a bunch of missing configs, gems, etc. But Cap says all is fine and successfully terminates my deploy!
deploy.rb:
lock '3.4.0'
set :application, 'myapp'
set :repo_url, 'git@github.com:name/myapp.git'
set :deploy_to, '/home/deploy/myapp'
set :deploy_user, 'deploy'
set :linked_files, fetch(:linked_files, []).push('config/database.yml', '.env')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute :touch, release_path.join('tmp/restart.txt')
end
end
after :publishing, :restart
end
deploy/production.rb
role :app, %w{deploy@123.456.78.09}
role :web, %w{deploy@123.456.78.09}
role :db, %w{deploy@123.456.78.09}
set :rails_env, :production
server '123.456.78.09', user: 'deploy', roles: %w{app db web}, primary: true
set :ssh_options, {
keys: %w(/Users/user/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey password)
}
'capistrano/rails'
or'capistrano/bundler'
? - The F