On the CI/CD documentation on using service, it is clear that the service can be accessed using the alias as the hostname.
However there is no documentation (or I cannot find) on inter-service networking. On the example below, the test code is able to access the database via dbhost and middleware via middlewarehost.
However the middleware cannot connect to the database. I’ve tried using the alias which is dbhost and localhost. Any body know how to connect services together?
I’m getting cannot resolve host when using the alias dbhost from the middleware service.
run-test: image: maven:3.3.9-jdk-8 stage: test only: - master services: - name: database alias: dbhost - name: middleware alias: middlewarehost variables: DBPROFILE: integration-test MAX_ATTEMPTS: 30 SPRING_PROFILES_ACTIVE: docker script: - mvn test -Dtest=**/**IT tags: - docker