내 ec2 인스턴스에 symfony2 앱을 배포하려고합니다. deploy.rb 파일을 구성하고 cap deploy : setup을 사용하여 서버 디렉토리를 초기화 할 수 있습니다. 그러나 캡 배포를 실행하면이 오류가 발생합니다 : failed "sh -c 'cd /var/www/html/capifonytest/releases/20110920052019 && php app/console cache:warmup --env=prod'" on xxx.xx.xxx.xx
. 여기 내 deploy.rb 파일입니다 :Capifony를 사용하여 ec2에 symfony2 앱 배포
set :application, "capifonytest"
default_run_options[:pty] = true
set :scm, :git
set :deploy_to, "/var/www/html/#{application}"
set :repository, "[email protected]:myname/myrepo.git"
set :branch, "master"
set :ssh_options, { :forward_agent => true }
set :user, "ec2-user"
set :domain, "xxx.xx.xxx.xx"
ssh_options[:keys] = [File.join(ENV["AWS_HOME"], "tsmith.pem")]
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :use_sudo, true
set :keep_releases, 3
사람은 EC2 인스턴스에 symfony2 응용 프로그램을 배포하거나 그렇게 할 capifony/카피 스트라 노를 사용하기위한 좋은 튜토리얼/자원을 알고 있나요 ? symfony2가 ec2 인스턴스에서 작동하도록하는 팁이나 트릭도 많이 사용됩니다. 나는 amazon 리눅스 ami 64 비트를 실행하고 있는데, 이것은 centos를 기반으로한다고 생각합니다.
servers: ["107.20.247.96"]
[107.20.247.96] executing command
** [out :: 107.20.247.96] find:/var/www/html/capifonytest/releases/2011092118<br /> 2846/web/css': No such file or directory<br /> ** [out :: 107.20.247.96] find:
/var/www/html/capifonytest/releases/2011092118
2846/web/images': No such file or directory
** [out :: 107.20.247.96] find:/var/www/html/capifonytest/releases/2011092118<br /> 2846/web/js': No such file or directory<br /> command finished in 358ms<br /> triggering after callbacks for
deploy:finalize_update'
* executing `symfony:cache:warmup'
* executing "cd /var/www/html/capifonytest/releases/20110921182846 && php app/
console cache:warmup --env=prod"
servers: ["107.20.247.96"]
[107.20.247.96] executing command
** [out :: 107.20.247.96] PHP Warning: require_once(/var/www/html/capifonytest
/releases/20110921182846/app/../vendor/symfony/src/Symfony/Component/Locale/Reso
urces/stubs/functions.php): failed to open stream: No such file or directory in
/var/www/html/capifonytest/releases/20110921182846/app/autoload.php on line 25
** [out :: 107.20.247.96] PHP Fatal error: require_once(): Failed opening requ
ired '/var/www/html/capifonytest/releases/20110921182846/app/../vendor/symfony/s
rc/Symfony/Component/Locale/Resources/stubs/functions.php' (include_path='.:/usr
/share/pear:/usr/share/php') in /var/www/html/capifonytest/releases/201109211828
46/app/autoload.php on line 25
command finished in 302ms
* [deploy:update_code] rolling back
* executing "rm -rf /var/www/html/capifonytest/releases/20110921182846; true"
servers: ["107.20.247.96"]
[107.20.247.96] executing command
command finished in 280ms
failed: "sh -c 'cd /var/www/html/capifonytest/releases/20110921182846 && php app
/console cache:warmup --env=prod'" on 107.20.247.96