I have a docker compose file running 2 different services and i have launched a third container which is acting as a database for the first two containers.
Third container is a vector db and when i am trying to communicate via the new instantiated docker container i am getting the below error:
File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 501, in send
whisperfusion-1 | raise ConnectionError(err, request=request)
whisperfusion-1 | requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
How can i manage communication between both docker containers.
My docker compose file:
version: '3.8'
services:
service1:
build:
context: docker
dockerfile: Dockerfile
image: service1:latest
volumes:
- type: bind
source: ./docker/scratch-space
target: /root/scratch-space
- type: bind
environment:
VERBOSE: ${VERBOSE:-false}
DB_HOST: host.docker.internal
DB_PORT: 3306
DB_USER: '4545'
DB_PASSWORD: '4545'
DB_NAME: 'fszdz'
ports:
- "8888:8888"
- "6006:6006"
deploy:
resources:
reservations:
devices:
- capabilities: ["gpu"]
entrypoint: ["/root"]
nginx:
image: nginx:latest
volumes:
- ./docker/resources/docker/default:/etc/nginx/conf.d/default.conf:ro
- ./docker/scripts/start-nginx.sh:/start-nginx.sh:ro
ports:
- "8000:80"
depends_on:
- service1
entrypoint: ["/bin/bash", "/start-nginx.sh"]
I am starting other service with the below command:
docker run -p 8888:8888 epsilla/vectordb
How to communicate between two containers?
Do i need to rebuild the docker image and what chnages are required to establish the link?