GithubHelp home page GithubHelp logo

Comments (12)

antonmedv avatar antonmedv commented on July 19, 2024

Hi! How this speed ups deploys?

Note what composer itself caching vendor, so it's does not download it every time.

from recipes.

achristodoulou avatar achristodoulou commented on July 19, 2024

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.

oanhnn avatar oanhnn commented on July 19, 2024

@achristodoulou

  1. If copy, when project require new package (change composer.lock), it wont be download.
  2. In your task, file_exists is check on local machine, but run is running remote machine. 👎

from recipes.

achristodoulou avatar achristodoulou commented on July 19, 2024
  1. 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.

oanhnn avatar oanhnn commented on July 19, 2024

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.

achristodoulou avatar achristodoulou commented on July 19, 2024

Yes, actually is like this.

before('deploy:vendors', 'copy_vendors');

from recipes.

achristodoulou avatar achristodoulou commented on July 19, 2024

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.

achristodoulou avatar achristodoulou commented on July 19, 2024

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.

antonmedv avatar antonmedv commented on July 19, 2024

from recipes.

achristodoulou avatar achristodoulou commented on July 19, 2024

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.

antonmedv avatar antonmedv commented on July 19, 2024

Yes, it will be nice :)

from recipes.

achristodoulou avatar achristodoulou commented on July 19, 2024

Created pull request

deployphp/docs#52

from recipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.