rlewkowicz / docker-mediawiki-stack

Mediawiki Compose Stack
http://binaryoasis.com:8000
39 stars 16 forks source link

Consider making the mediawiki folder a submodule #1

Closed dylanvorster closed 7 years ago

dylanvorster commented 7 years ago

Would it not be a better idea to rather make the mediawiki folder a git submodule so that we can just pull the updates in that folder. Having all the source code of mediawiki duplicated here doesn't make sense if this tech stack wraps the media wiki project surely?

rlewkowicz commented 7 years ago

It's not quite duplicated. The skins and plugins are not out of the box. They're stored in separate repos and I do some gymnastics to bring it all together. I try to match their official snapshot for the most part. I also distribute with all composer dependencies pre-installed. Otherwise, you'd have to run composer install in all the subdirectories for skins, plugins, and core install. I wanted this to be as plug and play as possible.

However, the idea of still having a custom MediaWiki submodules folder is a good one. As it stands now you could do git pull --rebase -X ours if you want to make changes to anything and still update just mediawiki files.

Thoughts or concerns are welcome

dylanvorster commented 7 years ago

Hi there, well I actually ended up sort of recreating what you have but with quite a few differences. I setup everything that changes without my involvement as a submodule. This includes a set of 3 different skins, a set of really good plugins and of course a few other required files. Im not sure what you were using for sessions, but I'm using a Redis container for mine. Here is what my directory structure looks like:

screen shot 2016-11-27 at 9 40 05 pm

My Dockerfile-php custom builds php 7.1 and includes things like Image Magic and the Redis session handlers. The install.sh script in the container-php checks to see if a lock file is present, and if not, it invokes the installer programmatically to setup the DB, but then overwrites the generated LocalSettings.php with the one sitting in that directory. This allows me to ensure the setup of the complete system without having a user go through the clunky install process. I also pipe a bunch of settings through as environment variables such as the database username and password. Unfortunately, my complete setup isn't yet available online, because I'm using this for work and it has a private mysql container that solves a few small pitfalls (but those could be easily just moved to another dockerfile) that isnt available publicly yet. If I get round to getting this going, or you are interested in the finer details of mine, ill happily get it on github when I get a moment.

The main thing, is that I wanted to be able to provide a really decent wiki setup that has a lot of really good extensions pre-installed (including visual editor) of which all can be updated with a single git submodule foreach git pull origin master.

rlewkowicz commented 7 years ago

Nice! I did get the Submodules folder added (cause it was a pain to update mw without it). It will pull media wiki with it's plugins related to their respective branches.

I still don't do sub, sub modules cause I handle all that in jenkins everytime media wiki pushes a commit to their main repo.