-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
87 lines (85 loc) · 2.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3.8'
services:
book-service:
build:
context: .
dockerfile: Dockerfile
ports:
- "8082:8082"
environment:
- PORT=8082
- RABBITMQ_URL=amqp://rabbitmq:5672
- CASSANDRA_CONTACT_POINTS=cassandra:9042
- ELASTICSEARCH_NODE=http://elasticsearch:9200
depends_on:
cassandra:
condition: service_healthy
elasticsearch:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- microservices-network
rabbitmq:
image: rabbitmq:management
ports:
- "5672:5672"
- "15672:15672"
networks:
- microservices-network
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 10s
timeout: 5s
retries: 5
cassandra:
image: cassandra:latest
container_name: cassandra
ports:
- "9042:9042"
environment:
- CASSANDRA_CLUSTER_NAME=BookStoreCluster
- CASSANDRA_DC=dc1
networks:
- microservices-network
volumes:
- cassandra-data:/var/lib/cassandra
healthcheck:
test: ["CMD-SHELL", "cqlsh cassandra 9042 -e 'describe keyspaces'"]
interval: 10s
timeout: 10s
retries: 10
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
container_name: elasticsearch
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=your_password_here
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- microservices-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health"]
interval: 10s
timeout: 5s
retries: 5
kibana:
image: docker.elastic.co/kibana/kibana:7.10.1
container_name: kibana
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=your_password_here
networks:
- microservices-network
volumes:
cassandra-data:
esdata:
networks:
microservices-network:
driver: bridge