-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·58 lines (52 loc) · 1.09 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
version: "3"
services:
web:
image: httpd:latest
volumes:
- ./web/bin:/usr/local/apache2/htdocs
ports:
- 80:80
db:
image: cockroachdb/cockroach:v19.2.4
container_name: db
ports:
- "20000:26257"
- "8000:8080"
command: start --insecure
db_1:
image: cockroachdb/cockroach:v19.2.4
container_name: db_1
ports:
- "20001:26257"
- "8001:8080"
command: start --insecure --join=db
db_2:
image: cockroachdb/cockroach:v19.2.4
container_name: db_2
ports:
- "20002:26257"
- "8002:8080"
command: start --insecure --join=db
db-runner:
build: db
command: shell -c "/wait && /usr/local/bin/init-data.sh db:26257"
environment:
- WAIT_HOSTS=db:26257
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=120
- WAIT_HOST_CONNECT_TIMEOUT=30
volumes:
- ./db/sql:/docker-entrypoint-initdb.d
depends_on:
- db
- db_1
- db_2
links:
- "db:db"
- "db_1:db_1"
- "db_2:db_2"
api:
build: api
command: python app.py
ports:
- "81:5000"