D
D
Denis Ruchiev2016-12-08 19:28:11
git
Denis Ruchiev, 2016-12-08 19:28:11

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

2 answer(s)
E
Eugene Wolf, 2016-12-08
@denis_bardak

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

A
aol-nnov, 2016-12-08
@aol-nnov

There is a great repository on github ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question