machine:
  services:
    - docker

dependencies:
  override:
    - docker pull reiz/mongodb:3.2.0-1
    - docker pull reiz/elasticsearch:0.9.1-1
    - docker pull reiz/memcached:1.4.14
    - docker pull reiz/rabbitmq:3.4.2
    - docker run --name mongodb       -d reiz/mongodb:3.2.0-1
    - docker run --name memcached     -d reiz/memcached:1.4.14
    - docker run --name elasticsearch -d reiz/elasticsearch:0.9.1-1
    - docker run --name rabbitmq      -d reiz/rabbitmq:3.4.2

database:
  override:
    - cp config/mongoid.yml.ci config/mongoid.yml

test:
  override:
    - docker build -t versioneye/crawlr:1.0.0 .
    - docker run --env RAILS_ENV=test --link mongodb:db --link elasticsearch:es --link memcached:mc --link rabbitmq:rm -v $CIRCLE_TEST_REPORTS:$CIRCLE_TEST_REPORTS versioneye/crawlr:1.0.0 rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml

machine:
  services:
    - docker

dependencies:
  override:
    - docker pull versioneye/mongodb:3.2.6
    - docker pull reiz/elasticsearch:0.9.1-1
    - docker pull reiz/memcached:1.4.14
    - docker pull reiz/rabbitmq:3.4.2
    - docker run --name mongodb       -d versioneye/mongodb:3.2.6
    - docker run --name memcached     -d reiz/memcached:1.4.14
    - docker run --name elasticsearch -d reiz/elasticsearch:0.9.1-1
    - docker run --name rabbitmq      -d reiz/rabbitmq:3.4.2

database:
  override:
    - cp config/mongoid.yml.ci config/mongoid.yml

test:
  override:
    - docker build -t versioneye/crawlr:1.0.0 .
    - docker run --env RAILS_ENV=test --link mongodb:db --link elasticsearch:es --link memcached:mc --link rabbitmq:rm -v $CIRCLE_TEST_REPORTS:$CIRCLE_TEST_REPORTS versioneye/crawlr:1.0.0 rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml

Update MongoDB image for CircleCI.
Update MongoDB image for CircleCI.
