I find it difficult to determine how to connect containers that belong to different projects running on the docker, running on the same host.
Let's say I have a set of containers in Deployment A :
root@debussy :~# docker ps | awk '{print $2}' | grep "cl" cl-worker:latest cl-nginx:latest cl-app:latest cl-rabbitmq:latest cl-memcached:latest cl-db:latest
All of these containers are launched from a separate deployment-a.yml configuration file. Now we also have another Deployment B , with its own `deployment-b.yml:
root@debussy :~# docker ps | awk '{print $2}' | grep "stockagents" stockagents-app:latest
Is it possible to access the database ( cl-db container) from stockagents-app using a specific configuration in deployment-b.yml and / or deployment-a.yml ?
NOTE. . I know how to do this using the pure docker and linking containers using --link , but is there a way to achieve the same behavior using only docker-compose and its configuration files?
source share