T
T
topuserman2021-11-19 15:58:58
Continuous Integration
topuserman, 2021-11-19 15:58:58

Compose: automatic composer install on deploy?

When developing a project, we have composer.lock under version control.
To ensure that the versions of the local development packages match the versions on the production, when composer install.

I wanted to know
what are the easy ways to automatically perform composer install on prod if I did a git pull in which composer.lock was changed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Chinenkov, 2021-11-22
@cia

If you are using bitbucket, then there are palines that allow you to run different scripts on different events. Such a script should connect to your server and do "git pull" and "composer install".
github/gitlab has its own equally powerful tools that perform the same tasks.
There are also webhooks that allow you to run some kind of script on your server, available via http. But this approach is considered deprecated and not recommended.
If you have your own repository, then there are hooks in git (usually stored here: ".git/hooks"). In fact, this is also the launch of your script in response to an event. Only this time the script can be located locally and it just has to do "composer install".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question