I am running comprehensive docker-compose file where I am trying to implement health-check mechanism.
Currently it looks like this
All services run in the same network
At the same time, I can curl the localhost:8088 from host machine terminal...
docker-compose -
version: '2.3'
services:
# ... many more stuff above
migrations:
build:
...
depends_on:
...
volumes:
- ...
ports:
- "8088:8088"
healthcheck:
test: [ "CMD", "curl", "-f", "http://migrations:8088/" ] # throws 502 cannot connect
interval: 30s
timeout: 10s
retries: 15
someotherservice-whos-waiting-for-migration-service:
build:
...
depends_on:
migrations:
condition: service_healthy
# ... many more services bellow
What can be wrong here. Thank you for your help in advance
For the record. Running the whole setup on M1 pro chip and colima for docker management.
Hope to understand why I can't curl my own url from the container to proceed with healthcheck