我正在尝试将我的 symfony3 项目部署到生产服务器使用deployer.ord
. 我已经经历了所有deployer.org
的事情,不知道出了什么问题。下面是我的deploy.php
文件
<?php
/*
* This file has been generated automatically.
* Please change the configuration for correct use deploy.
*/
require 'recipe/symfony.php';
// Set configurations
set('repository', 'git@github.com:XXXXXX/YYYYYY');
set('shared_files', ['app/config/parameters.yml']);
set('shared_dirs', ['app/logs']);
set('writable_dirs', ['app/cache', 'app/logs']);
// Configure servers
server('production', 'dummysite.com', '21')
->user('2136439')
->password('123456')
->env('deploy_path', '/home/www/dummysite.com/web')
->stage('production');
/**
* Restart php-fpm on success deploy.
*/
task('php-fpm:restart', function () {
// Attention: The user must have rights for restart service
// Attention: the command "sudo /bin/systemctl restart php-fpm.service" used only on CentOS system
// /etc/sudoers: username ALL=NOPASSWD:/bin/systemctl restart php-fpm.service
run('sudo /bin/systemctl restart php-fpm.service');
})->desc('Restart PHP-FPM service');
after('success', 'php-fpm:restart');
/**
* Attention: This command is only for for example. Please follow your own migrate strategy.
* Attention: Commented by default.
* Migrate database before symlink new release.
*/
// before('deploy:symlink', 'database:migrate');
我得到的错误是:PHP Notice: Connection terminated by the server
我已经尝试过这个资源,但仍然没有运气 http://www.issart.com/blog/deployment-of-symfony2-application-using-deployer/
我想知道我是否使用了正确的凭据(我使用的是 ftp 凭据)进行部署。
我也无法在 deployer.org 上找到很多在线信息以及如何部署和调试的分步信息,因此我们将不胜感激。