Hello,
i'm running capistrano with mongrel_cluster. i have on my box three
different versions. development, testing. production. i have for the
threee different environment three tasks in my recipe. deploying works
fine, but mongrel_cluster is always starting with development
environment.
the file i copy in my recipe is correctly copied. every environment
has is correct mongrel_cluster.yml.
but why mongrel_cluster is always starting with -e development? any
ideas?
here are my tasks:
================================================================
task :dev do
set :rails_env, "development"
set :deploy_to, "/opt/rails/desire/development"
desc "Link in the corresponding mongrel_cluster"
task :after_update_code, :roles => :app do
run "cp #{release_path}/config/mongrel_cluster_development.yml
#{release_path}/config/mongrel_cluster.yml"
end
end
task :test do
set :rails_env, "testing"
set :deploy_to, "/opt/rails/desire/testing"
desc "Link in the corresponding mongrel_cluster"
task :after_update_code, :roles => :app do
run "cp #{release_path}/config/mongrel_cluster_testing.yml
#{release_path}/config/mongrel_cluster.yml"
end
end
task :prod do
set :rails_env, "production"
set :deploy_to, "/opt/rails/desire/production"
desc "Link in the corresponding mongrel_cluster"
task :after_update_code, :roles => :app do
run "cp #{release_path}/config/mongrel_cluster_production.yml
#{release_path}/config/mongrel_cluster.yml"
end
end
task :before_restart do
puts "#{rails_env}"
puts "#{release_path}"
end
task :before_restart_mongrel_cluster do
puts "#{rails_env}"
puts "#{release_path}"
end
task :before_migrate do
if(rails_env == "")
puts ' !!USE!!: cap [dev_migrate|test_migrate|prod_migrate] '
exit
end
end
task :before_deploy do
if(rails_env == "")
puts '!!USE!!: cap [dev|test|prod|] deploy'
exit
end
end
================================================================
these are my mongrel cluster files copied to the deployed environment:
================================================================
user: rails
cwd: /opt/rails/desire/development/current
port: "8100"
environment: development
group: rails
pid_file: log/mongrel_development.pid
servers: 1
user: rails
cwd: /opt/rails/desire/production/current
port: "8300"
environment: production
group: rails
pid_file: log/mongrel_production.pid
servers: 1
user: rails
cwd: /opt/rails/desire/testing/current
port: "8200"
environment: testing
group: rails
pid_file: log/mongrel_testing.pid
servers: 1
================================================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---