Commit fc0a2db0c6116a31b6d2aceaaf9182da7b6af84e
Merge branch 'develop/cluster-refactoring' of github.com:thingsboard/thingsboard…
… into develop/cluster-refactoring
Showing
3 changed files
with
31 additions
and
1 deletions
Dockerfile.cassandra
0 → 100644
1 | +FROM cassandra | |
2 | + | |
3 | +WORKDIR /opt/cassandra | |
4 | + | |
5 | +COPY dao/src/main/resources/cassandra/schema.cql /opt/cassandra | |
6 | + | |
7 | +COPY entrypoint-with-db-init.sh /opt/cassandra/entrypoint-with-db-init.sh | |
8 | + | |
9 | +RUN chmod +x /opt/cassandra/entrypoint-with-db-init.sh | |
10 | + | |
11 | +ENTRYPOINT ["/opt/cassandra/entrypoint-with-db-init.sh"] | |
12 | + | |
13 | +CMD ["cassandra", "-f"] | ... | ... |
... | ... | @@ -8,6 +8,9 @@ services: |
8 | 8 | - "2181:2181" |
9 | 9 | |
10 | 10 | cassandra-tb: |
11 | + build: | |
12 | + context: . | |
13 | + dockerfile: Dockerfile.cassandra | |
11 | 14 | image: cassandra |
12 | 15 | networks: |
13 | 16 | - core |
... | ... | @@ -15,7 +18,9 @@ services: |
15 | 18 | - "7199:7199" |
16 | 19 | - "9160:9160" |
17 | 20 | - "9042:9042" |
18 | - | |
21 | + volumes: | |
22 | + - /cassandra:/var/lib/cassandra | |
23 | + - ./db-schema:/docker-entrypoint-initdb.d/ | |
19 | 24 | redis: |
20 | 25 | image: redis:4.0 |
21 | 26 | networks: | ... | ... |