These are chat archives for composer/composer

16th
Aug 2017
Peter Delvaux
@pjetr
Aug 16 2017 08:23

Goodmorning!
I have a question. I'm using Symfony and in a quest to speed up my devbox (on Docker / Vagrant) I found this page: http://symfony.com/doc/current/configuration/override_dir_structure.html.
I found out I can move the vendor-folder out of my mounted root by adding this to my composer.json:

{
    "config": {
        "vendor-dir": "/tmp/project-name/vendor"
    },
}

But is there a way to do this based on my environment? Because I only want to do so if a certain variable exists in my ENV

Peter Delvaux
@pjetr
Aug 16 2017 08:30
other then using multiple composer.json files
Scrummer
@scrummer
Aug 16 2017 08:55
With docker you should be able to mount your files/directories by passing command line arguments or by adding the mount to your docker-compose.yml
Peter Delvaux
@pjetr
Aug 16 2017 09:06
thing is, I want my vendor out of my (slow) shared volume.
Rob
@alcohol
Aug 16 2017 09:40
@pjetr you could make sure this is set inside your vagrant / docker image: https://getcomposer.org/doc/03-cli.md#composer-vendor-dir
then you don't need to modify your composer.json
Peter Delvaux
@pjetr
Aug 16 2017 13:06
@alcohol thanks, I'll check that out!