Skip to content

Commit 7a01de6

Browse files
committed
Use cassandra for demo mode; remove query db from docker compose
1 parent ce40622 commit 7a01de6

File tree

3 files changed

+46
-38
lines changed

3 files changed

+46
-38
lines changed

docker-compose.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ services:
1212
depends_on:
1313
- cassandra
1414
- zookeeper
15-
- query_db
1615
environment:
1716
JDBC_URL: jdbc:postgresql://192.168.99.100:54321/hmda?user=postgres&password=postgres
1817
ZOOKEEPER_HOST: zookeeper
@@ -117,15 +116,6 @@ services:
117116
EXCLUDE_PORTS: '25' # don't proxy SMTP port
118117
EXTRA_SETTINGS: 'reqirep "^([^ :]*)\ /mail//?(.*)" "\1\ /\2"'
119118

120-
query_db:
121-
image: postgres:9.6.1
122-
ports:
123-
- '54321:5432'
124-
environment:
125-
POSTGRES_DB: hmda
126-
POSTGRES_USER: postgres
127-
POSTGRES_PASSWORD: postgres
128-
129119
zookeeper:
130120
image: jplock/zookeeper
131121
ports:

docker-dev.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,4 @@ services:
1111
ports:
1212
- '9042:9042'
1313
- '7000:7000'
14-
- '7199:7199'
15-
16-
query_db:
17-
image: postgres:9.6.1
18-
ports:
19-
- '54321:5432'
20-
environment:
21-
POSTGRES_DB: hmda
22-
POSTGRES_USER: postgres
23-
POSTGRES_PASSWORD: postgres
14+
- '7199:7199'

persistence-model/src/main/resources/application-dev.conf

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,54 @@ akka {
6060
}
6161
}
6262
persistence {
63-
journal {
64-
plugin = "akka.persistence.journal.leveldb"
65-
leveldb {
66-
dir = "target/journal"
67-
native = false
68-
}
69-
}
70-
snapshot-store {
71-
plugin = "akka.persistence.snapshot-store.local"
72-
local {
73-
dir = "target/snapshots"
74-
}
75-
}
76-
query {
77-
journal {
78-
id = "akka.persistence.query.journal.leveldb"
79-
}
80-
}
63+
journal.plugin = "cassandra-journal"
64+
snapshot-store.plugin = "cassandra-snapshot-store"
65+
query {
66+
journal.id = "cassandra-query-journal"
67+
}
8168
}
8269
}
8370

71+
cassandra-journal {
72+
contact-points = ["192.168.99.100"]
73+
contact-points = [${?CASSANDRA_CLUSTER_HOSTS}]
74+
keyspace = "hmda_journal"
75+
keyspace = ${?CASSANDRA_JOURNAL_KEYSPACE}
76+
table = "journal"
77+
keyspace-autocreate = true
78+
keyspace-autocreate-retries = 5
79+
connect-retries = 10
80+
connect-retry-delay = 5s
81+
reconnect-max-delay = 60s
82+
authentication.username = ""
83+
authentication.username = ${?CASSANDRA_CLUSTER_USERNAME}
84+
authentication.password = ""
85+
authentication.password = ${?CASSANDRA_CLUSTER_PASSWORD}
86+
}
87+
88+
cassandra-snapshot-store {
89+
contact-points = ["192.168.99.100"]
90+
contact-points = [${?CASSANDRA_CLUSTER_HOSTS}]
91+
keyspace = "hmda_snapshot"
92+
keyspace = ${?CASSANDRA_SNAPSHOT_KEYSPACE}
93+
table = "snapshot"
94+
keyspace-autocreate = true
95+
keyspace-autocreate-retries = 5
96+
connect-retries = 10
97+
connect-retry-delay = 5s
98+
reconnect-max-delay = 60s
99+
authentication.username = ""
100+
authentication.username = ${?CASSANDRA_CLUSTER_USERNAME}
101+
authentication.password = ""
102+
authentication.password = ${?CASSANDRA_CLUSTER_PASSWORD}
103+
}
104+
105+
cassandra-query-journal {
106+
refresh-interval = 5s
107+
refresh-interval = ${?QUERY_JOURNAL_REFRESH_INTERVAL}
108+
read-retries = 10
109+
}
110+
84111

85112
hmda {
86113
actor-lookup-timeout = 5

0 commit comments

Comments
 (0)