/
docker-compose.yml
61 lines (54 loc) · 1.2 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
58
59
60
61
version: '2'
networks:
default:
external:
name: fruits-network
services:
monolith:
build: .
ports:
- 8080:8080
depends_on:
- fruits
environment:
- FRUITS_ENDPOINT=http://fruits:8081
- PRIVATE_KEY_FILE=/run/secrets/private_key
- USE_DB_FILE=/run/database.db
volumes:
- type: bind
source: ./server.pem
target: /run/secrets/private_key
read_only: true
- type: bind
source: ./monolith.db
target: /run/database.db
read_only: false
redis:
image: redis:latest
volumes:
- ./redis-data:/data
command: redis-server --appendonly yes
fruits:
image: fruits-microservice:latest
ports:
- 8081:8081
depends_on:
- redis
environment:
- REDIS_ENDPOINT=redis:6379
- PUBLIC_KEY_FILE=/run/secrets/public_key
volumes:
- type: bind
source: ./server.pem.pub
target: /run/secrets/public_key
read_only: true
grafana:
image: grafana/grafana:latest
ports:
- 3030:3000
prometheus:
image: prom/prometheus:latest
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml