/
docker-compose.yml
49 lines (45 loc) · 1.04 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
version: "2.2"
services:
mysql:
image: mysql:8.0
hostname: mysql
container_name: mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=smartcache
- MYSQL_PASSWORD=smartcache
- MYSQL_DATABASE=smartcache
grafana:
image: smartcache/grafana
build:
context: ./docker/grafana
dockerfile: ./Dockerfile
hostname: grafana
container_name: grafana
ports:
- 3000:3000
redis:
image: redis-server-with-cache-cli
build:
context: ./docker/redis
dockerfile: ./Dockerfile
hostname: redis
container_name: redis-server-with-cache-cli
ports:
- 6379:6379
demo:
image: fieldengineering/demo-redis-smart-cache:latest
hostname: smartcache
container_name: smartcache
restart: on-failure
depends_on:
- mysql
- redis
ports:
- 8080:8080
environment:
- SPRING_REDIS_HOST=redis
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql/smartcache