stdin_open: true to your
react service, like:
... services: react: #name of first service build: client #specify the directory of docker file stdin_open: true ports: - "3000:3000" #specify port mapping ...
You might need to rebuild or clean cached so “docker-compose up –build” or “docker-compose build –no-cache” then “docker-compose up“
In your database connections line in your index.js file or whatever you named should have :
where “database” is your named MongoDB service. You can use your container IP address too with
docker inspect <container> and use the IP the see there too. Ideally you want to have a ENV in your Dockerfile or
ENV MONGO_URL mongodb://database:27017/