我正在使用healthcheck / mongo,让mongo-express在那儿等待service_healthy。为什么不等待,浏览器中localhost:8081的结果是404? :(
#Docker Engine: 18.06.1-ce
#docker-compose: 1.22.0, build f46880f
version: '2.1'
services:
mongodb:
image: healthcheck/mongo:latest
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=rootpass
ports:
- "27017:27017"
volumes:
- "./mongo/data:/data/db"
mongo-express:
image: mongo-express
restart: always
depends_on:
mongodb:
condition: service_healthy
ports:
- "8081:8081"
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=rootpass