forked from coderkan/spring-boot-redis-cache
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
57 lines (54 loc) · 1.42 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
version: '3.9'
services:
cache:
image: redis/redis-stack:latest
container_name: cache
hostname: cache
ports:
- '6379:6379'
- "8001:8001"
environment:
REDIS_ARGS: "--requirepass jasonrocks"
volumes:
- ./redis_data:/data
cassandra1:
image: 'bitnami/cassandra:latest'
environment:
- CASSANDRA_CLUSTER_NAME=test
- CASSANDRA_SEEDS=cassandra1
- CASSANDRA_PASSWORD_SEEDER=yes
- SPRING_CASSANDRA_USER=cassandra
- SPRING_CASSANDRA_PASSWORD=jph
# this is actually hardcoded with SIMPLE Snitch
- CASSANDRA_DATACENTER=datacenter1
- CASSANDRA_HOST=cassandra1
container_name: cassandra1
hostname: cassandra1
ports:
- '9042:9042'
- '9160:9160'
volumes:
- ./cassandra:/bitnami
- ./cassandra_init:/docker-entrypoint-initdb.d
spring-cache:
image: spring-cache
container_name: spring-cache
hostname: spring-cache
environment:
- SPRING_CASSANDRA_HOST=172.21.0.2
- SPRING_CASSANDRA_PORT=9042
- SPRING_CASSANDRA_USER=cassandra
- SPRING_CASSANDRA_PASSWORD=jph
- SPRING_CASSANDRA_CLUSTER=test
- SPRING_CASSANDRA_DATACENTER=datacenter1
- SPRING_REDIS_HOST=cache
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_PASSWORD=jasonrocks
build:
context: .
dockerfile: Dockerfile
ports:
- '8080:8080'
depends_on:
- cassandra1
- cache