Composer setup for serving multiple sites using one TYPO3 system for all sites

Since Composer-install is the preferred “future” way to use TYPO3 I try to figure out how to have the Server-setup for that.
Now the different TYPO3 system- src versions are located in /usr/share/ and available for the hosted sites.
Sites have symlinks towards the TYPO3 base to make it work. Updating or using different versions side by side is very easy. Also saving space, since not every site has its own TYPO3 system-files installed. Only having local files when needed (extensions, site-packags etc.)>
Will this work the same way, when using composer setup? How to deal with that?
I followed the instructions from the manual for migrating to a composer system. Version control — TYPO3 Upgrade Guide main documentation
I still do not get the whole picture here :slight_smile: Would be help-full if I could see an example of a similar set-up. Or a howto/ instruction, info, etc. on how to set things up for such a approach.

Sites are now public available in /var/www/domain/www while having symlinks to /usr/share/typo3-src
And with the folders for local use - fileadmin - typo3conf - ext. etc.
But with the new or required setup for composer the folder structure has changed? Does this mean the set-tup I have now will not work any more? And do I need to run composer per site? As in the ddev example?


A typical composer installation has it’s own copy of the TYPO3 sources.

I can’t imagine that you can build multiple instances with just one composer run as the different instances might need different package versions.

As each instance has it’s own rules which packet in which version should be stored where, there are no problems with different structures for different TYPO3 versions.

So with Composer it is no longer possible to have? :

TYPO3version1 symlink --> from sites 1 and 2
TYPO3version2  symlink --> from sites 3,4,5,6, 7 
TYPO3version3  symlink --> from sites 2_dev

I haven’t heard about the possibility.
Alas composer can use symlinks for local packages, TYPO3 is no local package.
And it might become complicated if different installation need different versions. (while you can handle different versions with version-strings concatenated to the package name, composer can not use such work-arounds)

Maybe you can ask this composer-question on stack overflow, where more composer experts will see the question and might find a solution.