I have a go app that needs mongo and redis as services, everything was working fine. all in a sudden mongo service is not reachable anymore. redis container is still working fine though.
I found in couple of topics that it might be a race issue, go app already started while mongo container is not completely running. so I added dockerize to wait for mongo but it gave me connection refused all the time. looks like it is something with running mongo itself inside circleci environment.
docker: - image: circleci/golang:1.11 - image: circleci/mongo:4.1.9 port: 27017:27017 environment: - MONGODB_USERNAME: "x" - MONGODB_PASSWORD: "x" - MONGO_INITDB_ROOT_USERNAME: "x" - MONGO_INITDB_ROOT_PASSWORD: "x" - image: circleci/redis:alpine port: 6379:6379 - image: circleci/dynamodb steps: - setup_remote_docker - run: name: Waiting for Redis command: dockerize -wait tcp://localhost:6379 -timeout 1m - run: name: Waiting for Mongo command: dockerize -wait tcp://localhost:27017 -timeout 1m - checkout - run: name: Test command: | ./go.test.sh