Ideas on Linking separate applications when in development

Say I have 3 separate applications within their own git repos.
Some connect to redis and some to a db.

What are the best practices on configuration for this?
Does each project have its own Dockerfile? I’d assume yes.
How to link them up? Have a “maser” compose file in the root of those?
Or use some service discovery?

You could use separate docker files - this will be handy in production environment…
But for development environment I would use docker-compose…

As in would you suggest having one single docker-compose file that references all the apps/services?
They then would have to be within child folders of the docker compose file right?
Maybe via git submodules?

Not a must - but it would be more handy in terms of source control…
BTW - using ENV variables would also be a good solution - and will help setting a machine in prod & dev envs.