Docker Community Forums

Share and learn in the Docker community.

Ideas on Linking separate applications when in development

(Ian) #1

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?

(Noamguy) #2

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

(Ian) #3

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?

(Noamguy) #4

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.