Until two weeks ago, my CI/CD using github actions and docker containers worked perfectly.
But now, the CI/CD fails everytime because I am not able to connect to the MongoDB container anymore and run my integration tests. I did not change anything in my config files (neither docker-compose.yml, neither Dockerfile, neither the workflow yml file and neither the init-mongo.js file).
Here is my workflow :
jobs: build: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Build the Docker containers run: docker-compose -f docker-compose.test.yml up -d - name: Check docker containers status run: docker ps - name: Create database run: docker-compose exec -T -u root php bin/console d:m:s:c --env=test
Here is the content of the docker-compose.test.yml file :
version: '3.7' services: appquarium-mongo-apiuser: image: mongo container_name: appquarium-mongo-apiuser environment: MONGO_INITDB_DATABASE: database_name MONGO_INITDB_ROOT_USERNAME: username MONGO_INITDB_ROOT_PASSWORD: password volumes: - .docker/mongo/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro ports: - 27017:27017 appquarium-php-apiuser: image: deozza/appquarium-apiuser build: context: . dockerfile: .docker/php/Dockerfile target: test container_name: appquarium-php-apiuser restart: on-failure user: '1000:1000'
And here is the error I got since two days :
No suitable servers found (serverSelectionTryOnce
set): [connection refused calling ismaster on 'appquarium-mongo-apiuser:27017']
Needless to say that when I replicate the workflow manually on my dev environment, and even on my prod environment, all works perfectly.
Any idea ? Does your workflow still working ? Has something changed within the github action system that I missed and I need to adapt to ?