-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (37 loc) · 1.05 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
version: '3.8'
services:
cassandra:
image: cassandra:4.0.6
container_name: cassandra
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces" ]
interval: 5s
timeout: 5s
retries: 60
ports:
- "9042:9042"
volumes:
- ./cassandra/data/:/var/lib/cassandra
environment:
CASSANDRA_DC: datacenter1
CASSANDRA_PASSWORD: cassandra
# By default, Cassandra autodetects the available host memory and takes as much as it can.
# Therefore, memory options are mandatory if multiple Cassandras are launched in the same node.
MAX_HEAP_SIZE: 2G
HEAP_NEWSIZE: 200M
training-app:
container_name: training-app
build: training-app
restart: always
ports:
- "8080:8080"
depends_on:
cassandra:
condition: service_healthy
environment:
- SPRING_DATA_CASSANDRA_CONTACTPOINTS=cassandra
healthcheck:
test: "curl --fail --silent http://localhost:8080/private/health | grep UP || exit 1"
interval: 20s
timeout: 5s
retries: 5