Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Using composer and a own Git respository.


Go to End


4 Posts   1851 Views

Avatar
MarioSommereder

Community Member, 107 Posts

10 September 2015 at 1:30am

Hej there,

maybe it's just me, but I have a problem with my workflow.

I have a Git repository for all of my files I need for development. Inside this folder is a /public folder, containing the files for the webserver. When I commit something, my deploy agent puts the files from this folder to the webserver.

Now when I use composer, I'll get Gits in Git and this does not work well for me. For example, when I install silverstripe/translatable via composer, it will not appear in my Git repo and so it will not be pushed to the webserver.

What do I have to change that it works with composer or what is your best practise therfore?

Thanks in advance.

Cheers, Mario

Avatar
camfindlay

Forum Moderator, 267 Posts

14 September 2015 at 5:08pm

Hey, you might want to check your .gitignore file. Usually we only store the custom project files in our git repo and let Composer do the dependancy management. I take it from your explanation you're committing your entire project and modules into the git repo (and then up to the server).

Question, when you say... public folder... do you mean a git branch?

Avatar
MarioSommereder

Community Member, 107 Posts

14 September 2015 at 7:47pm

Hej.

I checked all the .gitignore files, but this does not always work. For example, deleting the .git and .gitignore files of /cms and /framework does not "unlock" all files for my repository. There are some hundret - for me - random files not added.

My Git repository contains the source files, the distribution generated via Gulp or Grunt, the documentation, settings files, db dumps, etc. So my deployment service grabs either the /develop folder for the test server or the /release folder for the live server. That's why it would be great to checkout the composer modules without any version control / development stuff.

How do you do it?

Avatar
camfindlay

Forum Moderator, 267 Posts

14 September 2015 at 8:45pm

Try adding --prefer-dist when you run the composer command.