-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
69 lines (63 loc) · 1.63 KB
/
docker-compose.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
php:
image: bandsintown/php:${VERSION}
build:
context: .
dockerfile: ./versions/${VERSION}/Dockerfile
php-test:
image: bandsintown/php:${VERSION}-test
build:
context: .
dockerfile: ./versions/${VERSION}/test/Dockerfile
environment:
- SERVICE_NAME=php-fpm
- CONSUL_HTTP_ADDR=consul:8500
ports:
- 9000:9000
# Test image (packages, services, scripts)
test-image:
image: bandsintown/php:${VERSION}-test
command: bats /tests/image
environment:
- VERSION=${VERSION}
# Tests for consul template
test-consul-template:
image: bandsintown/php:${VERSION}-test
command: dockerize -wait http://consul:8500 -timeout 10s bats /tests/consul-template
depends_on:
- consul
environment:
- DISABLE_CONSUL_TEMPLATE=true
- CONSUL_HTTP_ADDR=consul:8500
- VERSION=${VERSION}
# Consul
consul:
image: consul:0.7.5
command: "agent -dev -client 0.0.0.0 -ui"
container_name: consul-php
ports:
- 8301
- 8500:8500
environment:
- CONSUL_BIND_INTERFACE=eth0
- SERVICE_IGNORE=true
# Registrator
registrator:
image: nhuray/registrator:v7
command: "-internal consul://consul:8500"
container_name: registrator-php
depends_on:
- consul
volumes:
- /var/run/docker.sock:/tmp/docker.sock
# Consulator
consulator:
image: lewispeckover/consulator
command: "sync -prefix=service /app/consulator.yml"
container_name: consulator
depends_on:
- consul
volumes:
- ./consulator.yml:/app/consulator.yml
environment:
- CONSUL_HTTP_ADDR=consul:8500