-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.local.yml
103 lines (98 loc) · 2.18 KB
/
docker-compose.local.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
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
version: "3.8"
services:
api:
build:
context: .
dockerfile: Dockerfile.air
ports:
- "4500:4500"
volumes:
- .:/app
depends_on:
crdb-1:
condition: service_healthy
redis:
condition: service_healthy
networks:
- web_api
redis:
image: redis:6.0.9-alpine
container_name: api_redis
ports:
- "6379:6379"
restart: always
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- web_api
crdb-1:
container_name: crdb-db
image: cockroachdb/cockroach:latest
ports:
- "8080:8080"
- "26257:26257"
volumes:
- crdb-1-data:/cockroach/cockroach-data
command: start --insecure --join=crdb-1,crdb-2,crdb-3
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- web_api
crdb-2:
image: cockroachdb/cockroach:latest
volumes:
- crdb-2-data:/cockroach/cockroach-data
command: start --insecure --join=crdb-1,crdb-2,crdb-3
networks:
- web_api
crdb-3:
image: cockroachdb/cockroach:latest
volumes:
- crdb-3-data:/cockroach/cockroach-data
command: start --insecure --join=crdb-1,crdb-2,crdb-3
networks:
- web_api
crdb-runner:
image: cockroachdb/cockroach:latest
restart: on-failure
depends_on:
- crdb-1
- crdb-2
- crdb-3
volumes:
- ./entrypoints/db/sql-init.d:/docker-entrypoint-initdb.d
- ./entrypoints/db/init-data.sh:/usr/local/bin/init-data.sh:ro
command:
- "shell"
- "/usr/local/bin/init-data.sh"
- "crdb-1:26257"
networks:
- web_api
minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
container_name: minio-storage
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: admin.123
command: server --console-address :9001 /data
volumes:
- minio-data:/data
networks:
- web_api
networks:
web_api:
driver: bridge
volumes:
crdb-1-data:
crdb-2-data:
crdb-3-data:
minio-data: