정확히 어디에 문제가 있는지 잘 모르겠지만 Capistrano는 거의 빈 프로젝트를 배포하는 데 약 5 분이 걸립니다.Capistrano very slow
내가 잘못했거나 평소인지 알 수 있습니까?
내가 사용하고 :
- 카피 스트라 노 2.9.0을
- 레일 3.1.3
- Github의 저장소
- 너무 느린 서버 (4 개 코어 1 개 기가 바이트 메모리)
- ngix, 승객
내가 얻는 결과는 다음과 같습니다. https://gist.github.com/1632009
Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
deploy.rb
# -*- encoding : utf-8 -*-
require "bundler/capistrano"
set :user, 'rubys'
set :domain, 'example.com'
set :application, 'EXAMPLE'
# adjust if you are using RVM, remove if you are not
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2'
#set :rvm_type, :user
# file paths
set :repository, "[email protected]:GITHUBREPO/ashop.git"
set :deploy_to, "/apps/#{application}"
# using a local git repository on the server you are deploying to.
set :deploy_via, :remote_cache
set :copy_exclude, [ '.git' ]
# distribute your applications across servers (the instructions below put them
# all on the same server, defined above as 'domain', adjust as necessary)
role :app, domain
role :web, domain
role :db, domain, :primary => true
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :scm_verbose, false
set :use_sudo, false
set :rails_env, :production
namespace :deploy do
desc "cause Passenger to initiate a restart"
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end
편집
- Networkspeed 직장 : 012 3,516,http://www.speedtest.net/result/1714391142.png
- 속도 Github에서 - 서버 : ~ 300KiB
네트워크 속도가 느린가요? –
이론상 5Mbit 업로드/다운로드 http://www.speedtest.net/result/1714391142.png – Mark
어쩌면 서버 <=> github가 느립니다. –