language: php
services: docker

env:
  - VERSION=platform

install:
  - composer create-project silverstripe/installer ~/src
  - docker run -d --name database --env MYSQL_ALLOW_EMPTY_PASSWORD=true mysql
  - cp examples/_ss_environment.php ~/src/_ss_environment.php

before_script:
  - env | sort
  - cd "$VERSION"
  - image="brettt89/silverstripe-web:${VERSION}"
  - image="${image//'/'/-}"

script:
  - travis_retry docker build -t "$image" .
  - docker run --name web --link database --volume ~/src:/var/www/html "$image" php /var/www/html/framework/cli-script.php dev/build

after_script:
  - docker images

language: php
services: docker

env:
  - VERSION=platform

install:
  - composer create-project silverstripe/installer ~/src
  - docker run -d --name database --env MYSQL_ALLOW_EMPTY_PASSWORD=true mysql
  - cp examples/_ss_environment.php ~/src/_ss_environment.php

before_script:
  - env | sort
  - cd "$VERSION"
  - image="brettt89/silverstripe-web:${VERSION}"
  - image="${image//'/'/-}"

script:
  - travis_retry docker build -t "$image" .
  - docker run --name web --expose 80:80 --link database --volume ~/src:/var/www/html "$image" php /var/www/html/framework/cli-script.php dev/build
  - curl http://localhost/

after_script:
  - docker images

Add HTTP based check for Apache configuration
NEW: Add HTTP based check for Apache configuration
