Answer the question
In order to leave comments, you need to log in
What composer files to upload to the server?
Knowledgeable people, please help me figure out how to work with composer. There is a big project on codeiniter, work via git. On the local server installed composer added the necessary libraries, everything works fine. Tell me what files I should push to the repository. Do you also need to put composer on the server? In general, tell me how it's all now correctly roll out to the server.
Answer the question
In order to leave comments, you need to log in
There are two options:
1. Upload all the files that composer generates to the site / server - the repository takes more than all the files when cloning, pushing to the server, etc. - immediately in their places, and are not downloaded again. This option is usually NOT used, for subjective reasons.
2. Add a folder to ignore /vendor
, then to the server resp. you need to install composer , and after you had some kind of update in the composer (a module was added, updated, changed, etc.) -- on the server (via a git hook as an option) we run composer install
.
Which mechanism you choose is purely a matter of personal preference. The second option is classic, the first one is more "reliable" and allows you not to install composer on the server.
Standard fileThe .gitignore from the Laravel framework root, with a few additions from me, looks like this:
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
# phpstorm project files
.idea
# netbeans project files
nbproject
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question