| Q | A
| ----------------- | ---
| Issue Type | Question
| Deployer Version | master
| Local Machine OS | windows 10 pro 1803
| Remote Machine OS | CentOS Linux release 7.4.1708 (Core)
When deployer run the deploy:vendor step
cd /var/www/demo-app/releases/19 && /usr/bin/php /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
Here's the log
[111.230.206.231] < Loading composer repositories with package information
[111.230.206.231] < Installing dependencies from lock file
[111.230.206.231] < Dependency resolution completed in 0.000 seconds
[111.230.206.231] < Analyzed 112 packages to resolve dependencies
[111.230.206.231] < Analyzed 235 rules to resolve dependencies
[111.230.206.231] < Package operations: 53 installs, 0 updates, 0 removals
[111.230.206.231] < Installs: doctrine/inflector:v1.3.0, doctrine/lexer:v1.0.1, erusev/parsedown:1.7.1, vlucas/phpdotenv:v2.5.0, symfony/css-selector:v4.1.1, tijsverkoyen/css-to-inline-styles:2.2.1, symfony/polyfill-mbstring:v1.8.0, symfony/var-dumper:v3.4.12, symfony/routing:v3.4.12, symfony/process:v3.4.12, symfony/polyfill-ctype:v1.8.0, paragonie/random_compat:v2.0.17, symfony/polyfill-php70:v1.8.0, symfony/http-foundation:v3.4.12, symfony/event-dispatcher:v4.1.1, psr/log:1.0.2, symfony/debug:v3.4.12, symfony/http-kernel:v3.4.12, symfony/finder:v3.4.12, symfony/console:v3.4.12, egulias/email-validator:2.1.4, swiftmailer/swiftmailer:v6.1.2, ramsey/uuid:3.7.3, psr/simple-cache:1.0.1, psr/container:1.0.0, symfony/translation:v4.1.1, nesbot/carbon:1.32.0, mtdowling/cron-expression:v1.2.1, monolog/monolog:1.23.0, league/flysystem:1.0.45, laravel/framework:v5.5.40, fideloper/proxy:3.3.4, psr/http-message:1.0.1, guzzlehttp/psr7:1.4.2, guzzlehttp/promises:v1.3.1, guzzlehttp/guzzle:6.3.3, hieu-le/active:3.5.1, jakub-onderka/php-console-color:0.1, predis/predis:v1.1.1, cakephp/chronos:1.2.2, laravel/horizon:v1.3.1, nikic/php-parser:v4.0.3, jakub-onderka/php-console-highlighter:v0.3.2, dnoegel/php-xdg-base-dir:0.1, psy/psysh:v0.9.6, laravel/tinker:v1.0.7, intervention/image:2.4.2, mews/captcha:2.2.0, ezyang/htmlpurifier:v4.10.0, mews/purifier:2.1.0, caouecs/laravel-lang:3.0.54, overtrue/laravel-lang:3.0.8, overtrue/pinyin:3.0.6
[111.230.206.231] < - Installing doctrine/inflector (v1.3.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing doctrine/lexer (v1.0.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing erusev/parsedown (1.7.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing vlucas/phpdotenv (v2.5.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/css-selector (v4.1.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/polyfill-mbstring (v1.8.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/var-dumper (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/routing (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing symfony/process (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/polyfill-ctype (v1.8.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing paragonie/random_compat (v2.0.17): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/polyfill-php70 (v1.8.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/http-foundation (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/event-dispatcher (v4.1.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing psr/log (1.0.2): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/debug (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/http-kernel (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/finder (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/console (v3.4.12): Loading from cache
[111.230.206.231] < Extracting archive - Installing egulias/email-validator (2.1.4): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing swiftmailer/swiftmailer (v6.1.2): Loading from cache
[111.230.206.231] < Extracting archive - Installing ramsey/uuid (3.7.3): Loading from cache
[111.230.206.231] < Extracting archive - Installing psr/simple-cache (1.0.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing psr/container (1.0.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing symfony/translation (v4.1.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing nesbot/carbon (1.32.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing mtdowling/cron-expression (v1.2.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing monolog/monolog (1.23.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing league/flysystem (1.0.45): Loading from cache
[111.230.206.231] < Extracting archive - Installing laravel/framework (v5.5.40): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing fideloper/proxy (3.3.4): Loading from cache
[111.230.206.231] < Extracting archive - Installing psr/http-message (1.0.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
[111.230.206.231] < Extracting archive - Installing guzzlehttp/promises (v1.3.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing guzzlehttp/guzzle (6.3.3): Loading from cache
[111.230.206.231] < Extracting archive - Installing hieu-le/active (3.5.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing jakub-onderka/php-console-color (0.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing predis/predis (v1.1.1): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing cakephp/chronos (1.2.2): Loading from cache
[111.230.206.231] < Extracting archive - Installing laravel/horizon (v1.3.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing nikic/php-parser (v4.0.3): Loading from cache
[111.230.206.231] < Extracting archive - Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
[111.230.206.231] < Extracting archive - Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
[111.230.206.231] < Extracting archive - Installing psy/psysh (v0.9.6): Loading from cache
[111.230.206.231] < Extracting archive - Installing laravel/tinker (v1.0.7): Loading from cache
[111.230.206.231] < Extracting archive - Installing intervention/image (2.4.2): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing mews/captcha (2.2.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing ezyang/htmlpurifier (v4.10.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing mews/purifier (2.1.0): Loading from cache
[111.230.206.231] < Extracting archive - Installing caouecs/laravel-lang (3.0.54): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < - Installing overtrue/laravel-lang (3.0.8): Loading from cache
[111.230.206.231] < Extracting archive - Installing overtrue/pinyin (3.0.6): Loading from cache
[111.230.206.231] < Extracting archive
[111.230.206.231] < Generating optimized autoload files
[111.230.206.231] < > post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
[111.230.206.231] < > post-autoload-dump: @php artisan package:discover
[111.230.206.231] < Discovered Package: fideloper/proxy
[111.230.206.231] < Discovered Package: hieu-le/active
[111.230.206.231] < Discovered Package: intervention/image
[111.230.206.231] < Discovered Package: laravel/horizon
[111.230.206.231] < Discovered Package: laravel/tinker
[111.230.206.231] < Discovered Package: mews/captcha
[111.230.206.231] < Discovered Package: mews/purifier
[111.230.206.231] < Discovered Package: nesbot/carbon
[111.230.206.231] < Discovered Package: overtrue/laravel-lang
[111.230.206.231] < Package manifest generated successfully.
When deploy finish, I change directory to current/vendor and found something missing.Here is the packages when deploy finish:
autoload.php cakephp composer doctrine erusev fideloper hieu-le jakub-onderka league monolog nesbot overtrue predis psy swiftmailer tijsverkoyen
bin caouecs dnoegel egulias ezyang guzzlehttp intervention laravel mews mtdowling nikic paragonie psr ramsey symfony vlucas
Change the directory to current and run composer install.When it finish, the packages:
autoload.php cakephp dnoegel erusev filp hamcrest jakub-onderka maximebf monolog nesbot paragonie phpspec psr sebastian symfony vlucas
barryvdh caouecs doctrine ezyang fzaninotto hieu-le laravel mews mtdowling nikic phar-io phpunit psy summerblue theseer webmozart
bin composer egulias fideloper guzzlehttp intervention league mockery myclabs overtrue phpdocumentor predis ramsey swiftmailer tijsverkoyen
some packages like barryvdh/laravel-debugbar add. I need to run composer install again in the server. Is something I need to know? I'm a new userer of deployer.
deploy.php<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'my_project');
// Project repository
set('repository', '[email protected]:rust17/hello_laravel.git');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', false);
// Shared files/dirs between deploys
set('shared_files', ['.env']);
set('shared_dirs', [
'storage'
]);
// Writable dirs by web server
set('writable_dirs', []);
set('cleanup_use_sudo', true);
set('ssh_multiplexing', false);
// Hosts
host('111.230.206.231')
->user('deployer')
->identityFile('~/.ssh/deployerkey')
->set('deploy_path', '/var/www/demo-app');
// Tasks
desc('Deploy your project');
task('deploy', [
'deploy:info',
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:writable',
'deploy:vendors',
'deploy:clear_paths',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success'
]);
// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
see above
I found those packages are require-dev.So I add this into my deploy.php:
set('composer_options', 'install --verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader');
It works.
And those may be helpful:
https://github.com/deployphp/deployer/issues/878
https://github.com/deployphp/deployer/issues/1298
Most helpful comment
I found those packages are
require-dev.So I add this into my deploy.php:It works.
And those may be helpful:
https://github.com/deployphp/deployer/issues/878
https://github.com/deployphp/deployer/issues/1298