kellerkinderDE / deployer-shopware5

Deployer base config to setup our shopware deployment
MIT License
9 stars 1 forks source link

using composer for download and update of shopware #11

Open rawdlite opened 5 years ago

rawdlite commented 5 years ago

What about using a composer based install? I am thinking of

By using composer we could handle dependencies effectively. What is your take on this?

cheers tom

rawdlite commented 4 years ago

So far i have this and it seems to work:

/**
 * composer based install
 */
task(
    'shopware:install',
    function () {
        run('mkdir {{shopware_temp_dir}}');
        run('cd {{shopware_temp_dir}} && git clone https://github.com/shopware/composer-project.git');
        run('rsync --recursive --ignore-existing {{shopware_temp_dir}}/composer-project/ {{shopware_public_path}}/');
        run('rm -rf {{shopware_temp_dir}}');
        run('cd {{shopware_public_path}} && composer install');
    }
)->desc('checkout shopware composer project');

This assumes there is a composer.json in repositories web folder. (taken from shopware/composer-project) The shopware version can be set in the require setting. As well as adding requirements "k10r/staging": "1.0.3", "k10r/deployment": "1.2.0" in that composer.json. I could do a PR if that helps.

Cheers tom

kleinmann commented 4 years ago

Hi Tom!

We're currently not using this setup for composer-based Shopware environments. If this works for you, feel free to create a PR with a separate deploy-shopware-composer.php augmenting the base configuration with your composer-specific tasks :-)

It may however be more suited for a fork, as we'll probably not be able to maintain that configuration.

Best regards Uwe