-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
120 lines (112 loc) · 2.54 KB
/
docker-compose.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: '3'
networks:
database:
internal: true
cache:
internal: true
api:
internal: true
monit:
proxy:
services:
redis-forum-api:
image: redis
container_name: redis-forum-api
restart: unless-stopped
expose:
- 6379
networks:
- cache
mysql-forum-api:
image: mysql:5.7
container_name: mysql-forum-api
restart: unless-stopped
environment:
MYSQL_DATABASE: 'forum'
MYSQL_USER: 'forum'
MYSQL_PASSWORD: 'Bk55yc1u0eiqga6e'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_ROOT_HOST: '%'
volumes:
- ./mysql:/docker-entrypoint-initdb.d
expose:
- 3306
networks:
- database
depends_on:
- redis-forum-api
app-forum-api:
build:
context: ./app/
dockerfile: Dockerfile
image: app-forum-api
container_name: app-forum-api
restart: unless-stopped
networks:
- api
- database
- cache
depends_on:
- mysql-forum-api
healthcheck:
test: "curl -sS http://app-forum-api:8080/actuator/health"
interval: 1s
timeout: 30s
retries: 60
proxy-forum-api:
image: nginx
container_name: proxy-forum-api
restart: unless-stopped
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/proxy.conf:/etc/nginx/conf.d/proxy.conf
ports:
- 80:80
networks:
- proxy
- api
depends_on:
- app-forum-api
prometheus-forum-api:
image: prom/prometheus:latest
container_name: prometheus-forum-api
restart: unless-stopped
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus/prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
networks:
- monit
- api
depends_on:
- proxy-forum-api
grafana-forum-api:
image: grafana/grafana
container_name: grafana-forum-api
volumes:
- ./Grafana:/var/lib/grafana
restart: unless-stopped
ports:
- 3000:3000
networks:
- monit
depends_on:
- prometheus-forum-api
client-forum-api:
build:
context: ./client/
dockerfile: Dockerfile
image: client-forum-api
container_name: client-forum-api
restart: unless-stopped
networks:
- proxy
depends_on:
- grafana-forum-api