I'm trying to deploy my symfony3 project to production server Using deployer.ord
. I've been through all around deployer.org
and not sure what is going wrong. Below is my deploy.php
file
<?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');
The error that i am getting is : PHP Notice: Connection terminated by the server
I have already tried this resource but still no luck http://www.issart.com/blog/deployment-of-symfony2-application-using-deployer/
I wonder if i am using the right credentials (i am using ftp ones) for deployment.
I was also not able to find much of info online on deployer.org and a step-by-step on how to deploy and debug so any help would be highly appreciated.