Symfony3 project deployment to prod server using Deployer.org
<p>I'm trying to deploy my symfony3 project to production server Using <code>deployer.ord</code>. I've been through all around <code>deployer.org</code> and not sure what is going wrong. Below is my <code>deploy.php</code> file </p>

<pre><code>&lt;?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')
    -&gt;user('2136439')
    -&gt;password('123456')
    -&gt;env('deploy_path', '/home/www/dummysite.com/web')
    -&gt;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');
})-&gt;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');
</code></pre>

<p>The error that i am getting is : <code>PHP Notice: Connection terminated by the server</code></p>

<p>I have already tried this resource but still no luck
<a href="http://www.issart.com/blog/deployment-of-symfony2-application-using-deployer/" rel="nofollow">http://www.issart.com/blog/deployment-of-symfony2-application-using-deployer/</a></p>

<p>I wonder if i am using the right credentials (i am using ftp ones) for deployment. </p>

<p>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.</p>