version: '3.3'

services:

  test:
    build:
      context: ..
      dockerfile: docker/Dockerfile
    image: ${IMAGE:-pipdevs/app}
    links:
      - email
      - mongo
      - couchbase
    environment:
      - EMAIL_SERVICE_HOST=email
      - EMAIL_SERVICE_PORT=8080
      - MONGO_SERVICE_URI=
      - MONGO_SERVICE_HOST=mongo
      - MONGO_SERVICE_PORT=27017
      - MONGO_DB=app
      - COUCHBASE_SERVICE_URI=
      - COUCHBASE_SERVICE_HOST=couchbase
      - COUCHBASE_SERVICE_PORT=8091
      - COUCHBASE_USER=Administrator
      - COUCHBASE_PASS=password
      - HTTP_ENABLED=true
      - GRPC_ENABLED=true
    ports:
      - "8080:8080"
      - "8090:8090"

  email:
    image: pipdevs/pip-services-email-node:latest
    links:
      - mongo
      - couchbase
    environment:
      - MONGO_SERVICE_URI=
      - MONGO_SERVICE_HOST=mongo
      - MONGO_SERVICE_PORT=27017
      - MONGO_DB=app
      - COUCHBASE_SERVICE_URI=
      - COUCHBASE_SERVICE_HOST=couchbase
      - COUCHBASE_SERVICE_PORT=8091
      - COUCHBASE_USER=Administrator
      - COUCHBASE_PASS=password
      - HTTP_ENABLED=true
      - GRPC_ENABLED=true

  mongo:
    image: mongo:latest

  couchbase:
    image: couchbase/server-sandbox:5.5.1
