We have this setup in Wikimedia production (kinda…):
test2.wikipedia.org
has both
test.wikipedia.org and
commons.wikimedia.org configured as
foreign file repos. Conveniently it's a testing wiki, so you can try out
how exactly this works.
--
Bartosz Dziewoński