From 71f22866355f1c41a28c1a7a2e394402353fa6cb Mon Sep 17 00:00:00 2001 From: Jasper Herzberg Date: Thu, 22 Feb 2024 07:20:46 +0100 Subject: [PATCH] ci: use host ip to reach the mongodb container in e2e tests See https://stackoverflow.com/questions/65497331/github-actions-is-it-possible-to-call-the-runner-host-from-a-docker-container --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78696009b..2969951e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: run: ./tools/db/kordis-db.sh init e2edb - name: Start API and SPA containers run: | - docker run -d --name kordis-api-container -p 3000:3333 -e MONGODB_URI=mongodb://host.docker.internal:27017/e2edb -e AUTH_PROVIDER=dev kordis-api:${{ github.sha }} + docker run -d --name kordis-api-container -p 3000:3333 -e MONGODB_URI=mongodb://172.17.0.1:27017/e2edb -e AUTH_PROVIDER=dev kordis-api:${{ github.sha }} docker run -d --name kordis-spa-container -p 4200:8080 -e API_URL=http://localhost:3000 -e AUTH_PROVIDER=dev kordis-spa:${{ github.sha }} - name: Run E2Es id: e2e-tests