forked from coderkan/spring-boot-redis-cache
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
41 lines (39 loc) · 918 Bytes
/
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
version: '3.9'
services:
cache:
image: redis/redis-stack:latest
container_name: cache
ports:
- '6379:6379'
- "8001:8001"
environment:
REDIS_ARGS: "--requirepass jasonrocks"
volumes:
- ./redis_data:/data
db:
image: postgres
container_name: db
ports:
- '5432:5432'
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=ekoloji
spring-cache:
image: spring-cache
container_name: spring-cache
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/postgres
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=ekoloji
- SPRING_REDIS_HOST=cache
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_PASSWORD=jasonrocks
build:
context: .
dockerfile: Dockerfile
ports:
- '8080:8080'
depends_on:
- db
- cache