Comments (12)
Hi! How this speed ups deploys?
Note what composer itself caching vendor, so it's does not download it every time.
from recipes.
True, but when you have for example 118 packages (this is my case :)) and no one is install then composer will have to go one by one and get them from cache and that requires more time against copying the existing vendor directory and then composer installing only what is required.
Not copying vendor folder from current release, deployer took:
real 0m47.409s
user 0m19.889s
sys 0m5.653s
Copying vendor folder from current release, deployer took:
real 0m19.326s
user 0m12.878s
sys 0m3.183s
from recipes.
- If copy, when project require new package (change
composer.lock
), it wont be download. - In your task,
file_exists
is check on local machine, butrun
is running remote machine. 👎
from recipes.
- During development you add a new package to your composer.json, run composer update and then commit your changes including composer.lock. When u run composer install in production it will read your packages from composer.lock correct? If so the new package will be download.
2.True I am running this on localServer
from recipes.
During development you add a new package to your composer.json, run composer update and then commit your changes including composer.lock. When u run composer install in production it will read your packages from composer.lock correct? If so the new package will be download.
Your deploy
task look like?
task('deploy', [
// ...
'deploy:copy_vendors',
'deploy:vendors',
// ...
]);
from recipes.
Yes, actually is like this.
before('deploy:vendors', 'copy_vendors');
from recipes.
Anyway, the initial idea was to optimize the deployment procedure on localServer, so if by copying vendors will not do any harm I am ok with this. And as you can see in my previous post, the execution time is about half :)
from recipes.
Fyi, after checking the existing recipes I found out that in common.php there is a task called "deploy:copy_dirs" which is doing the same thing as I have suggested, is just more generic.
from recipes.
from recipes.
Are you referring to the existing task in common.php 'deploy:copy_dirs', if that so, yes I can update doc in https://github.com/deployphp/docs/blob/master/recipes.md accordingly.
from recipes.
Yes, it will be nice :)
from recipes.
Created pull request
from recipes.
Related Issues (20)
- Email recipe HOT 4
- [Error] Call to undefined method Symfony\Component\Console\Helper\QuestionHelper::getInputStream() HOT 5
- What about merging recipes and deployer? HOT 7
- Issue with recipe/sentry HOT 3
- [slack] No branch or commit name HOT 2
- add npm build to npm recipe
- Rsync filterperdir wrong variable HOT 2
- RocketChat Integration HOT 2
- Sentry recipe fails when there's no .git directory HOT 2
- MS Teams notification integration HOT 1
- Website recipes documentation is not aligned with repository docs
- Problems configuring cachetool
- Sentry Release/Deploy fails due to server response HOT 4
- Segmentation Fault / Slack Recipe / PHP 7.3
- Problem resolving CacheTool binary
- Catch-22: Deployer installs composer dependencies, but deployer/recipes is a dependency HOT 3
- Zulip recipe HOT 1
- releaseIsGitDirectory() needs to return 0 if it's not a git repo
- Rollbar notify do not work with --hosts option
- New cachetool release (5.X) breaks cachetool recipe expectations for PHP 7.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recipes.