We are using Symfony2 on a AWS Beanstalk Application. For the Deployment we adjusted the Deployment-Script to do a composer install after the application has been uploaded.
Eventhough this works theoretically, it has some downsides - mainly the constantly increasing deployment-time (which sometimes results in server timeouts) and increasing dependencies on the availability of other servers.
I have read that some people copy the vendor/*
to a tmp-dir and move it back after the deployment to speed-up the deployment.
It's definetely helpful but we are updating our composer.json
quite often so we still have to have a composer install in our deployment-process. We believe that the best approach is to include all dependencies (vendor/*
) as files in the repo and skip the composer install during the deployment.
Unfortunately most libraries are included as git-submodules and AWS does not support submodules (all files have to be in the repo).
So here comes my question:
What is the best way to remove all git-submodules and commit the real files instead?
I have tried combining:
git submodules --recursive foreach
with How do I remove a submodule? but without succes.