0

I have a setup with several services and one coordinator which can call the other services. At least that is what I want to do. All the services are reachable externally via postman. I want them to be reachable from the coordinator-service. I get "error": "Client error: GET http://localhost/xx/d6afd493-ff2a-4f69-84d6-ab8c26e5e64e when calling another service from the coordinator.

The yml for the coordinator x:

version: "3"
volumes:
  datavolume:
    driver: local
networks:
  service:
    external: true
services:
  xapi:
    hostname: x
    container_name: x_php
    build:
      context: .
      dockerfile: docker-php
    volumes:
    - ./api:/var/www/api
    - ./api/logs:/var/www/logs
    - ./site.conf:/etc/apache2/sites-available/000-default.conf
    ports:
    - "81:80"
    env_file:
    - ./api/.env
    networks:
    - service

The yml for the internal service xx:

version: "3"

volumes:
  datavolume:
    driver: local
networks:
  service:
    external: true
services:
  autorisation:
    container_name: xx
    build:
      context: .
      dockerfile: docker-php
    volumes:
      - ./api:/var/www/api
      - ./api/logs:/var/www/logs
      - ./site.conf:/etc/apache2/sites-available/000-default.conf
    # expose:
    #  - 80
    ports:
      - "80:80"
    env_file:
      - ./api/.env
    depends_on:
      - postgres
    links:
      - postgres
    networks:
      - service
  postgres:
    container_name: xx-db
    image: postgres
    env_file:
      - ./api/.env
    restart: always
    ports:
      - "54321:5432"
    volumes:
      - datavolume:/var/lib/postgresql/data
      - ./entity.sql:/docker-entrypoint-initdb.d/entity.sql
    networks:
      - service

Any help would be very much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.