-
Notifications
You must be signed in to change notification settings - Fork 2
/
dev.docker-compose.yaml
107 lines (99 loc) · 2.38 KB
/
dev.docker-compose.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: '2'
services:
regserver:
container_name: regserver
hostname: regserver
image: registry:latest
volumes:
- bowline-data-registry:/registry
ports:
- "5000:5000"
env_file:
- ./compose.env
mongo-bootstrap-semaphore:
container_name: mongo-bootstrap-semaphore
hostname: mongo-bootstrap-semaphore
image: library/mongo:latest
volumes:
- ./db/json/:/exampledata/
- bowline-data-mongo:/data/db
command: /exampledata/bootstrap.sh
env_file:
- ./compose.env
mongo:
container_name: mongo
hostname: mongo
image: library/mongo:latest
ports:
- "27017:27017"
volumes:
- bowline-data-mongo:/data/db
entrypoint: |
/bin/bash -c '
MAX_TRIES=30;
tries=0;
while [ ! -f /data/db/.bowline_bootstrapped ]; do
let tries=tries+1;
echo "Waiting for bootstrap semaphore, attempt $$tries";
if [ $$tries -gt $$MAX_TRIES ]; then
echo "Never found bootstrap in $$MAX_TRIES";
exit 1;
fi
sleep 1;
done
./entrypoint.sh mongod
'
env_file:
- ./compose.env
# An nginx ambassador that's
nginx-amb:
container_name: nginx-amb
hostname: nginx-amb
image: svendowideit/ambassador
expose:
- "443"
environment:
- "NGINX_PORT_443_TCP=tcp://localhost:443"
env_file:
- ./compose.env
bowline:
container_name: bowline
hostname: bowline
build: ./docker/bowline
image: dougbtv/bowline
volumes:
- /home/doug/codebase/bowline:/bowline
- /var/run/docker.sock:/var/run/docker.sock:rw
links:
- regserver:regserver
- mongo:mongo
- nginx-amb:dockertest.com
ports:
- "8000:8000"
env_file:
- ./compose.env
# echo "Starting nginx..."
# docker run \
# -p 80:80 -p 443:443 \
# --volumes-from bowline \
# --link bowline:bowline \
# --link regserver:regserver \
# -d -t dougbtv/bowline-nginx
bowline-nginx:
container_name: bowline-nginx
hostname: bowline-nginx
build: ./docker/nginx
image: dougbtv/bowline-nginx
volumes_from:
- bowline
links:
- bowline:bowline
- regserver:regserver
ports:
- "80:80"
- "443:443"
env_file:
- ./compose.env
volumes:
bowline-data-registry:
bowline-data-mongo: