-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (69 loc) · 2.47 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
version: "3"
services:
cassandra:
image: cassandra:latest
ports:
- 127.0.0.1:${CASSANDRA_PORT:-9042}:9042
restart: always
healthcheck:
test: ["CMD-SHELL", "cqlsh -e 'SELECT now() FROM system.local;'"]
interval: 30s
timeout: 10s
retries: 5
node1:
image: sample-akka-entity-replication:2021.7.0
restart: always
depends_on:
cassandra:
condition: service_healthy
environment:
JAVA_OPTS: >-
-Dhttp.host=node1
-Dakka.cluster.roles.0=replica-group-1
-Dakka.remote.artery.canonical.hostname=node1
-Dakka.cluster.seed-nodes.0=akka://ExampleSystem@${SEED:-node1}:2551
-Ddatastax-java-driver.basic.contact-points.0=cassandra:9042
-Dakka-entity-replication.raft.persistence.cassandra.journal.keyspace-autocreate=true
-Dakka-entity-replication.raft.persistence.cassandra.journal.tables-autocreate=true
-Dakka-entity-replication.raft.persistence.cassandra.snapshot.keyspace-autocreate=true
-Dakka-entity-replication.raft.persistence.cassandra.snapshot.tables-autocreate=true
-Dakka-entity-replication.eventsourced.persistence.cassandra.journal.keyspace-autocreate=true
-Dakka-entity-replication.eventsourced.persistence.cassandra.journal.tables-autocreate=true
node2:
image: sample-akka-entity-replication:2021.7.0
restart: always
depends_on:
cassandra:
condition: service_healthy
environment:
JAVA_OPTS: >-
-Dhttp.host=node2
-Dakka.cluster.roles.0=replica-group-2
-Dakka.remote.artery.canonical.hostname=node2
-Dakka.cluster.seed-nodes.0=akka://ExampleSystem@node1:2551
-Ddatastax-java-driver.basic.contact-points.0=cassandra:9042
node3:
image: sample-akka-entity-replication:2021.7.0
restart: always
depends_on:
cassandra:
condition: service_healthy
environment:
JAVA_OPTS: >-
-Dhttp.host=node3
-Dakka.cluster.roles.0=replica-group-3
-Dakka.remote.artery.canonical.hostname=node3
-Dakka.cluster.seed-nodes.0=akka://ExampleSystem@node1:2551
-Ddatastax-java-driver.basic.contact-points.0=cassandra:9042
haproxy:
build:
context: ./docker/haproxy
args:
http_proxy:
https_proxy:
restart: always
volumes:
- ./docker/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- 127.0.0.1:${APP_PORT:-8080}:8080
- 127.0.0.1:${STATS_PORT:-8081}:8081