version: "3"

services:
  customer-app:
    container_name: customer-service
    tty: true
    build:
      context: ../../.
      dockerfile: Dockerfile
      target: test
    env_file:
      - .env.dev
    environment:
      - HTTP_HOST=0.0.0.0
      - HTTP_PORT=8082

      - GRPC_HOST=0.0.0.0
      - GRPC_PORT=9082
      - GRPC_DOMEN=customer-app:9082

      - MONGO_HOST=mongo
      - MONGO_PORT=27017
      - MONGO_USER=test
      - MONGO_PASSWORD=test
      - MONGO_DB_NAME=admin
      - MONGO_AUTH=admin

      - KAFKA_BROKERS=localhost:8080,localhost:1111
      - KAFKA_TOPIC_TARIFF=tariff

      - JWT_ISSUER=pena-auth-service
      - JWT_AUDIENCE=pena

      - AUTH_MICROSERVICE_USER_URL=http://pena-auth-service:8000/user
      - HUBADMIN_MICROSERVICE_TARIFF_URL=http://hub-admin-service:8010/tariff
      - CURRENCY_MICROSERVICE_TRANSLATE_URL=http://cbrf-service:8020/translate
      - DISCOUNT_MICROSERVICE_GRPC_HOST=discount-service:9040
      - PAYMENT_MICROSERVICE_GRPC_HOST=treasurer-service:9085
    ports:
      - 8082:8082
      - 9082:9082
    networks:
      - dev

networks:
  dev: