I have a django application with mysql (chatbot) and rails application with mongodb each run over docker-compose They both running separately I want to connect them together, how can i accomplish that ???
My docker-compose file with rails
#with rails on the dockerfile
version: '3.6'
services:
db:
image: mongo:latest
volumes:
- ./tmp/db:/var/lib/mongo/data
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/IMS
ports:
- "3000:3000"
depends_on:
- db
bundle:
image: ims_web
volumes:
- /bundle
The django prroject :
#with django on the dockerfile
version: '3.6'
services:
db:
image: mysql:latest
volumes:
- ./tmp/db:/var/lib/mysql/data
web:
build: .
command: bundle exec rails s -p 4000 -b '0.0.0.0'
volumes:
- .:/SDV
ports:
- "4000:4000"
depends_on:
- db
bundle:
image: sdv_web
volumes:
- /bundle