I’ve been scratching my head for a couple of hours here. I have this docker-compose file:
version: "3" services: scraper-api: build: ./ATPScraper volumes: - ./ATPScraper:/usr/src/app ports: - "5000:80" networks: - backend test-app: build: ./test-app volumes: - "./test-app:/app" - "/app/node_modules" ports: - "3001:3000" networks: - backend environment: - NODE_ENV=development depends_on: - scraper-api networks: backend:
test-app is a react app that should be able to communicate over a shared network with the flask
scraper-api. I’m having trouble doing this.
A little info:
- As you can see in my
composefile, I have attempted to define a shared network,
backendbetween the two services. I am still a newbie, so if I did this wrong, please let me know.
- The file structure in my local dev environment is:
parent => [test-app, ATPscraper]
scraper-apihas an initial endpoint of
- in my react app, I have been attempting to reach the
scraper-apiby trying a couple
getrequests to the url:
http://scraper-api:80/api/top_10. Is this correct? Through my scavenging of the docs, I think it is.
- both apps are running and working independently, but I want the ability to communicate.
Thanks in advance!