-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add capistrano3 #616
add capistrano3 #616
Conversation
remove database_yml command
Hey @v-fedorov |
I haven't had a chance to test all of them on production but the new markup should be correct.
I'm not 100% on the imports and exports, its been a little while since I tested these but I will give it another look. I will go through these again tonight and give you a definite by the time its morning for you :) |
Hi @v-fedorov I tried to test this locally in the github.com/magiclabs/alchemy3-demo, but could not get this working. I upgraded to capistrano 3 following this guide: http://capistranorb.com/documentation/upgrading/ The tasks INFO[dc857da4] Running bundle exec rake alchemy:db:dump on server1904.railsvserver.de
DEBUG[dc857da4] Command: cd && ( DUMP_FILENAME=db/dumps/2014-08-18-23-28.sql RAILS_ENV= bundle exec rake alchemy:db:dump )
DEBUG[dc857da4] Could not locate Gemfile
cap aborted! Other tasks have these problems as well. I guess something is missing, either in the upgrade guide or in the way we load/initialize the capistrano tasks in Alchemy. This is my local # Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rails'
require 'alchemy/capistrano3'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } This my # config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'alchemy3-demo'
set :repo_url, 'git://github.com/magiclabs/alchemy3-demo.git'
set :branch, :stable
role :app, %w{[email protected]}
role :web, %w{[email protected]}
role :db, %w{[email protected]}
set :deploy_to, '/var/www/alchemy-edge-demo'
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 Do you have a sample app where these tasks are working? That would be great. Thanks |
This is my Capfile (The alchemy capistrano3 tasks are added locally)
I think adding
or
here is my gemfile for reference
|
Thanks, I having a look into it right now. Got it working somehow now. I guess capistrano 3 is very buggy or I am getting something wrong: cap -T returns errors, with database adapter not specified. Debugging the while running: cap production -T works. 👏 But this is not of our concern. Will have the capistrano3 support soon. Thanks for your help so far. |
Ok. I it working now. I started to refactor the code even more to meet Capistrano DSL. Will publish a new branch soon. |
Since I don't have the time in the moment to finish this task I will write down what I have achieved for now. I don't think, that supporting Capistrano 3 is not critical at the moment. Capistrano 2 is still serving well. If anyone needs to use Capistrano 3, then please help us implementing this and keep this in mind:
|
One additional thought: We should remove the Capistrano 2 support with 3.1 then. |
Thomas, great thoughts. |
I refactored the Mount Point reader, so 1.) should be obsolete. |
This PR is stalled. I'll close this for now. Please feel free to open a new one, if needed. |
Adds updated commands for capistrano3