@uniqueginun that's the nature of docker, it automatically creates a new network for every docker-composer.yml (at least from what I understand)
If you want 2 separate docker setup to see each other, you need to configure a network like this:
Website:
network:
mynetwork:
services:
nginx:
image: nginx:stable-alpine
ports:
- "80:80"
network:
mynetwork:
API:
services:
nginx:
image: nginx:stable-alpine
ports:
- "80:80"
network:
mynetwork:
Something like that, bear in mind that you need to run your Website docker first so the mynetwork is created. and by the time you run your API, it will share to that network.
Another thing is after running your Website docker, docker somehow appends your project name to mynetwork network name so it will become website-mynetwork (I can't remember exactly). Maybe after running your Website docker, run docker network ls on the terminal to see what network name is generated.