forked from brettt89/silverstripe-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (29 loc) · 860 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: php
sudo: required
dist: trusty
services:
- docker
env:
- VERSION=platform
matrix:
include:
- env: VERSION=platform PHP=5.6
- env: VERSION=alpine PHP=5.6
- env: VERSION=platform PHP=7.1
- env: VERSION=alpine PHP=7.1
install:
- composer create-project silverstripe/installer ~/src
- docker run -d --name database --env MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:5.7
- cp examples/_ss_environment.php ~/src/_ss_environment.php
before_script:
- env | sort
- cd "${PHP}/${VERSION}"
- image="brettt89/silverstripe-web:${PHP}-${VERSION}"
script:
- travis_retry docker build -t "$image" .
- docker run -d --name web -p 80:80 --link database --volume ~/src:/var/www/html "$image"
- docker exec web usermod -u 2000 www-data
- sleep 5
- travis_retry curl http://localhost/dev/build
after_script:
- docker images