因此,我的背景是将其部署到共享主机帐户。 我已经对不同领域的其他部署工作没有问题,但由于某种原因,这个给了我悲伤。
我似乎无法理清造成工匠失败的原因。 我不得不回滚我的Laravel版本,因为这个主机不支持PHP 5.4所以我不知道这可能是一个问题。我去了Laravel 4.1的源代码,并确保文件是工匠和其他几个人的正确版本。
这个服务器上的PHP版本显然是一个快速的CGI版本,但我甚至尝试更新来自' php'的部署命令。到了' php-cli'并且失败但是下面没有500错误,只是没有关于失败的信息。
我已经在其上下载了composer.phar文件CHMOD 777,并将其存储在帐户的根目录中,而另一个帐户是我为此工作的另一个帐户。
* 2014-09-21 13:04:19 executing `deploy:migrate'
* executing "php /home/username/domaincom/releases/20140921170416/artisan migrate"
servers: ["domain.com"]
[domain.com] executing command
** [out :: domain.com] Status: 500 Internal Server Error
** [out :: domain.com] X-Powered-By: PHP/5.3.27
** [out :: domain.com] Content-type: text/html
** [out :: domain.com]
command finished in 381ms
*** [deploy:create_symlink] rolling back
*** no previous release to rollback to, rollback of symlink skipped
*** [deploy:update_code] rolling back
* executing "rm -rf /home/username/domain.com/releases/20140921170416; true"
我对此感到茫然,并且达到了挫折的程度。我希望能够利用我的共享经销商计划来构建和托管Laravel网站,但按照这个速度,我将不得不为这些或AWS micro购买另一个经销商,我不愿意这样做。已有资源。
欢迎任何建议/建议。我只需要解决这个问题。
编辑: 添加了完整的部署脚本输出。
triggering load callbacks
* 2014-09-21 13:04:10 executing `production'
triggering start callbacks for `deploy'
* 2014-09-21 13:04:10 executing `multistage:ensure'
* 2014-09-21 13:04:10 executing `deploy'
* 2014-09-21 13:04:10 executing `deploy:update'
** transaction: start
* 2014-09-21 13:04:10 executing `deploy:upload_config'
servers: ["domain.com"]
** sftp upload #<StringIO:0x00000001a33ff8> -> /home/username/domain.com/shared/config/database.php
[domain.com] /home/username/domain.com/shared/config/database.php
[domain.com] done
* sftp upload complete
servers: ["domain.com"]
** sftp upload #<StringIO:0x00000001f2a430> -> /home/username/domain.com/shared/config/app.php
[domain.com] /home/username/domain.com/shared/config/app.php
[domain.com] done
* sftp upload complete
servers: ["domain.com"]
** sftp upload #<StringIO:0x0000000227d038> -> /home/username/domain.com/shared/config/mail.php
[domain.com] /home/username/domain.com/shared/config/mail.php
[domain.com] done
* sftp upload complete
* 2014-09-21 13:04:11 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@bitbucket.org:drmcnasty/domain.com.git laravel-downgrade"
command finished in 968ms
* executing "if [ -d /home/username/domain.com/shared/cached-copy ]; then cd /home/username/domain.com/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard c4f8cb133da8e5097d6d0be7234b355f1befaa21 && git clean -d -x -f; else git clone -b laravel-downgrade git@bitbucket.org:drmcnasty/domain.com.git /home/username/domain.com/shared/cached-copy && cd /home/username/domain.com/shared/cached-copy && git checkout -b deploy c4f8cb133da8e5097d6d0be7234b355f1befaa21; fi"
servers: ["domain.com"]
[domain.com] executing command
** [domain.com :: out] HEAD is now at c4f8cb1 updated to last laravel version
command finished in 3833ms
copying the cached version to /home/username/domain.com/releases/20140921170416
* executing "cp -RPp /home/username/domain.com/shared/cached-copy /home/username/domain.com/releases/20140921170416 && (echo c4f8cb133da8e5097d6d0be7234b355f1befaa21 > /home/username/domain.com/releases/20140921170416/REVISION)"
servers: ["domain.com"]
[domain.com] executing command
command finished in 347ms
* 2014-09-21 13:04:17 executing `deploy:finalize_update'
* executing "rm -rf -- /home/username/domain.com/releases/20140921170416/public/system && mkdir -p -- /home/username/domain.com/releases/20140921170416/public/ && ln -s -- /home/username/domain.com/shared/system /home/username/domain.com/releases/20140921170416/public/system && rm -rf -- /home/username/domain.com/releases/20140921170416/log && ln -s -- /home/username/domain.com/shared/log /home/username/domain.com/releases/20140921170416/log && rm -rf -- /home/username/domain.com/releases/20140921170416/tmp/pids && mkdir -p -- /home/username/domain.com/releases/20140921170416/tmp/ && ln -s -- /home/username/domain.com/shared/pids /home/username/domain.com/releases/20140921170416/tmp/pids"
servers: ["domain.com"]
[domain.com] executing command
command finished in 346ms
* executing "find /home/username/domain.com/releases/20140921170416/public/images /home/username/domain.com/releases/20140921170416/public/stylesheets /home/username/domain.com/releases/20140921170416/public/javascripts -exec touch -t 201409211704.17 -- {} ';'; true"
servers: ["domain.com"]
[domain.com] executing command
** [out :: domain.com] find: `/home/username/domain.com/releases/20140921170416/public/javascripts': No such file or directory
command finished in 367ms
* 2014-09-21 13:04:17 executing `deploy:fix_permissions'
* executing "ls -x /home/username/domain.com/releases"
servers: ["domain.com"]
[domain.com] executing command
command finished in 347ms
* executing "chmod -R a+w /home/username/domain.com/releases/20140921170416/app/storage"
servers: ["domain.com"]
[domain.com] executing command
command finished in 338ms
* 2014-09-21 13:04:18 executing `deploy:copy_config'
* executing "cp /home/username/domain.com/shared/config/* /home/username/domain.com/releases/20140921170416/app/config/"
servers: ["domain.com"]
[domain.com] executing command
command finished in 326ms
* 2014-09-21 13:04:18 executing `deploy:prepare_artisan'
* executing "chmod u+x /home/username/domain.com/releases/20140921170416/artisan"
servers: ["domain.com"]
[domain.com] executing command
command finished in 322ms
* 2014-09-21 13:04:19 executing `deploy:create_symlink'
* executing "rm -f /home/username/domain.com/current && ln -s /home/username/domain.com/releases/20140921170416 /home/username/domain.com/current"
servers: ["domain.com"]
[domain.com] executing command
command finished in 340ms
* 2014-09-21 13:04:19 executing `deploy:migrate'
* executing "php /home/username/domain.com/releases/20140921170416/artisan migrate"
servers: ["domain.com"]
[domain.com] executing command
** [out :: domain.com] Status: 500 Internal Server Error
** [out :: domain.com] X-Powered-By: PHP/5.3.27
** [out :: domain.com] Content-type: text/html
** [out :: domain.com]
command finished in 381ms
*** [deploy:create_symlink] rolling back
*** no previous release to rollback to, rollback of symlink skipped
*** [deploy:update_code] rolling back
* executing "rm -rf /home/username/domain.com/releases/20140921170416; true"
servers: ["domain.com"]
[domain.com] executing command
command finished in 341ms
failed: "sh -c 'php /home/username/domain.com/releases/20140921170416/artisan migrate'" on domain.com
答案 0 :(得分:0)
所以显然你必须将部署文件中的capistrano命令更新为用户&#39; php-cli&#39;而不只是&#39; php&#39;。
现在我已经阅读了这篇文章,但我没有听到的是需要在composer.json文件的scripts部分进行此更改。