[TYPO3-dev] Best practice: How to store a complete TYPO3 installation in git

Loek Hilgersom loek at netcoop.nl
Wed May 8 21:56:15 CEST 2013


Hi Andi,

Interesting discussion. I'll just describe our way of working and the choices we 
made. We use our own set of deployment scripts [1] in which we made the 
following choices:

* TYPO3 core is excluded from the project (because it's independently maintained 
and updated. I think it only makes sense to include it if you would be patching 
the core extensively)

* We usually put only typo3conf under version control (including 
localconf.php/localConfiguration.php) and have all templates in an extension

* Most extensions are stored in the project repository, some are included as a 
submodule (e.g. for your own extension which you use in more projects)

* Database changes from TCA are processed automatically on deployment using the 
extension t3deploy

* Every version of the project allows to add sql-queries (up-scripts), files to 
be added to non-versioned and even shell-script to be run.
We looked at liquibase at the time but decided not to use it (not yet, at least)

* For content we use datasets, which consist of a combination of files 
(fileadmin, uploads) and database tables.

* Datasets can be both versioned or non-versioned (if they're too big to keep 
your repository portable). In practice, we usually have a dataset for testing 
which is us (We use scripts for creating datasets)

* We deploy using ant and rsync. We deploy either directly from a development 
machine to a server, or using Jenkins who will do a checkout of the chosen 
branch and deploys from there to the target server.
I'm not all that happy with ant (but it works, maybe should look into phing) but 
rsync rocks. For rsync I use an exclude file which is very similar to the 
gitignore. It would be even better if those 2 could be merged somehow.

You can find my version of the .gitignore in the scripts. I know this setup is 
not perfect but it works very well for our projects, and once you get the hang 
of it, you can apply it very quickly to existing or new projects. And it 
fulfills your question of putting a complete TYPO3 project in git.

Cheers,
Loek

[1] https://github.com/netcoop/typo3-installer

On 08-05-13 18:09, Andy Grunwald wrote:
> Hey everybody,
>
> i know that many people / companies working with git and TYPO3.
> Today i asked me (during a coffee break) which kind of ways are exists to store
> a _complete_ TYPO3 installation / project in git.
>
> Every problem in development can be solved by x ways. I think this question, too.
> But what are advantages / disadvantages of the different ways?
>
> Some (created in 2 min.) thoughts are:
>
> * Store the complete TYPO3 core source in Git?
> * Use a "build" script (e.g. to download TYPO3 source or extensions from TER, ...)
> * What about the database / content / changes? Tools like Liquibase [1]?
> * What about content assets? Set them to ignore?
> * What about TYPO3 Source updates?
>
> I think there are many more questions.
>
> The way of storing a project into git it direct related to the way to deliver it
> to the server.
> What are solutions for this?
>
> A short google search opened a stackoverflow post [2]
> But this far from "complete".
>
> Maybe some of you can post their experience and the way how you work with git
> and TYPO3 projects (private / customers).
> E.g. * What about your .gitignore? * What structure do you use? * Are custom
> scripts involved? * If yes, what does these custom scripts do?
>
> If there are some useful answers we / i can create a full "Best practice" post /
> topic in a Blog or on Buzz about this topic.
> In my opinion this is a topic which is interesting for many people.
>
> If someone of you using Subversion, the same question can be applied to this CVS
> as well.
> So your answer is welcome, too.
> But please notice at the start of your post which VCS you are using.
> THX :)
>
> Andy!
>
> http://www.liquibase.org/
> http://stackoverflow.com/questions/11905360/how-best-to-manage-typo3-installations-using-git
>



More information about the TYPO3-dev mailing list