-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (31 loc) · 1.11 KB
/
.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
36
37
38
39
40
41
42
43
44
45
46
47
# https://travis-ci.org/#!/phlax/nginx-docker
dist: trusty
sudo: true
language: python
services:
- docker
before_install:
- "echo '{\"storage-driver\": \"overlay2\"}' | sudo tee /etc/docker/daemon.json"
- sudo service docker restart
install:
- pip install -U docker-compose
- docker-compose build nginx
script:
# set the environment
- echo "COMPOSE_FILE=./example/docker-compose.yml" > ./.env
- docker-compose up -d nginx
- curl http://localhost:8000
- docker-compose exec nginx sh -c 'echo $NGINX_TEMPLATES_0'
- docker-compose exec nginx sh -c 'echo $NGINX_SITES_0'
- docker-compose exec nginx sh -c 'echo $NGINX_TEMPLATES_1'
- docker-compose exec nginx sh -c 'echo $NGINX_SITES_1'
- docker-compose exec nginx ls /etc/nginx/conf.d/
- docker-compose exec nginx cat /etc/nginx/conf.d/default.conf
- docker-compose exec nginx cat /etc/nginx/conf.d/foo.com.conf
- "curl -H 'Host: foo.com' http://localhost:8000"
- docker-compose logs nginx
- docker-compose stop nginx
- docker-compose ps
after_success:
- docker login -u phlax -p "$DOCKER_PASSWORD"
- docker push phlax/nginx