Capifony Symfony2部署
Capifony Symfony2 deployment
我在尝试将我的 Symfony2 应用程序部署到生产服务器时遇到此错误。
--> Downloading Composer
* executing "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"
Preparing to execute command: "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"
Execute ([Yes], No, Abort) ? |y| y
servers: ["myproject.net"]
[myproject.net] executing command
** [out :: myproject.net] <html>
** [out :: myproject.net] <head><title>302 Found</title></head>
** [out :: myproject.net] <body bgcolor="white">
** [out :: myproject.net] <center><h1>302 Found</h1></center>
** [out :: myproject.net] <hr><center>nginx</center>
** [out :: myproject.net] </body>
** [out :: myproject.net] </html>
command finished in 156ms
所以 curl -s http://getcomposer.org/installer|php
命令 returns 302,我不确定如何在我的脚本中解决这个问题。
我在 getcomposer.org 上看到 curl 使用额外的 -S
标志和 -s
标志,像这样 curl -sS http://getcomposer.org/installer|php
几个小时前,Composer 网站 (https://getcomposer.org/) 开始使用 302 响应将所有 HTTP 流量重定向到 HTTPS。
但是,问题是 Capifony 仍然指向安装程序的 HTTP 位置,并且 curl 不遵循重定向,因为未设置 -L
/ --location
标志。
你不是唯一遇到这个问题的人,还有 Capifony 的人 are already working on this。
同时,请参阅 解决方法:
To circumvent capifony downloading from the wrong url I added:
task :download_composer do
run "cd " + release_path + " && curl -s https://getcomposer.org/installer | php"
end
before "symfony:composer:update", "download_composer"
before "symfony:composer:install", "download_composer"
This works because capifony checks if composer.phar is already
present, if it is it'll warn you but just continue anyway
更新:问题现已解决,将 Capifony 更新为 version 2.8.5。
我在尝试将我的 Symfony2 应用程序部署到生产服务器时遇到此错误。
--> Downloading Composer
* executing "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"
Preparing to execute command: "sh -c 'cd /home/myproject/releases/20150427081943 && curl -s http://getcomposer.org/installer | php'"
Execute ([Yes], No, Abort) ? |y| y
servers: ["myproject.net"]
[myproject.net] executing command
** [out :: myproject.net] <html>
** [out :: myproject.net] <head><title>302 Found</title></head>
** [out :: myproject.net] <body bgcolor="white">
** [out :: myproject.net] <center><h1>302 Found</h1></center>
** [out :: myproject.net] <hr><center>nginx</center>
** [out :: myproject.net] </body>
** [out :: myproject.net] </html>
command finished in 156ms
所以 curl -s http://getcomposer.org/installer|php
命令 returns 302,我不确定如何在我的脚本中解决这个问题。
我在 getcomposer.org 上看到 curl 使用额外的 -S
标志和 -s
标志,像这样 curl -sS http://getcomposer.org/installer|php
几个小时前,Composer 网站 (https://getcomposer.org/) 开始使用 302 响应将所有 HTTP 流量重定向到 HTTPS。
但是,问题是 Capifony 仍然指向安装程序的 HTTP 位置,并且 curl 不遵循重定向,因为未设置 -L
/ --location
标志。
你不是唯一遇到这个问题的人,还有 Capifony 的人 are already working on this。
同时,请参阅
To circumvent capifony downloading from the wrong url I added:
task :download_composer do run "cd " + release_path + " && curl -s https://getcomposer.org/installer | php" end before "symfony:composer:update", "download_composer" before "symfony:composer:install", "download_composer"
This works because capifony checks if composer.phar is already present, if it is it'll warn you but just continue anyway
更新:问题现已解决,将 Capifony 更新为 version 2.8.5。