machine:
  services:
    - docker

dependencies:
  override:
    - docker info
    - sudo pip install --upgrade docker-compose==1.2.0
    # builds the image as a dependency
    - docker build -t soutech/champaign_web .

test:
  override:
    # tests the built image through docker-compose
    - annotate-output docker-compose -f circle/docker-compose.yml run web

database:
  override:
    - echo "look in circle/run-tests for database setup for testing environment"

deployment:
  hub:
  # change back to master!
    branch: aws-deploy
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push soutech/champaign_web

machine:
  services:
    - docker

dependencies:
  override:
    - docker info
    - sudo pip install --upgrade docker-compose==1.2.0
    # builds the image as a dependency
    - docker build -t soutech/champaign_web .

test:
  override:
    # tests the built image through docker-compose
    - annotate-output docker-compose -f circle/docker-compose.yml run web

database:
  override:
    - echo "look in circle/run-tests for database setup for testing environment"

deployment:
  hub:
  # change back to master!
    branch: aws-update-branch
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push soutech/champaign_web
  # deploy to elastic beanstalk
#  elasticbeanstalk:
#    branch: master
#    commands:
#      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
#      - ./deploy.sh $CIRCLE_SHA1

Change yaml deploy branch to aws-update-branch to pass through tests in build and to push to Docker Hub.
Change yaml deploy branch to aws-update-branch to pass through tests in build and to push to Docker Hub.
