-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
105 lines (84 loc) · 2.35 KB
/
Copy pathdocker-compose.yml
File metadata and controls
105 lines (84 loc) · 2.35 KB
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
services:
app:
build:
context: .
dockerfile: Dockerfile
image: notification-system:local
ports:
- "${APP_PORT:-8080}:8080"
environment:
APP_NAME: ${APP_NAME:-notification-system}
VIRTUAL_THREADS_ENABLED: ${VIRTUAL_THREADS_ENABLED:-false}
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/notification
SPRING_DATASOURCE_USERNAME: notification
SPRING_DATASOURCE_PASSWORD: notification
healthcheck:
test:
- CMD
- curl
- -fsS
- http://localhost:8080/actuator/health
interval: 10s
timeout: 3s
retries: 5
start_period: 20s
prometheus:
image: prom/prometheus:v3.13.0
ports:
- "${PROMETHEUS_PORT:-9090}:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
depends_on:
app:
condition: service_healthy
grafana:
image: grafana/grafana:13.1.1-ubuntu
ports:
- "${GRAFANA_PORT:-3000}:3000"
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-admin}
GF_USERS_ALLOW_SIGN_UP: "false"
volumes:
- grafana-data:/var/lib/grafana
- ./monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
- ./monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro
depends_on:
- prometheus
k6:
image: grafana/k6:2.1.0
profiles:
- test
environment:
BASE_URL: http://app:8080
volumes:
- ./k6:/scripts:ro
depends_on:
app:
condition: service_healthy
mysql:
image: mysql:8.4
environment:
MYSQL_DATABASE: notification
MYSQL_USER: notification
MYSQL_PASSWORD: notification
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-proot" ]
interval: 5s
timeout: 3s
retries: 10
volumes:
prometheus-data:
grafana-data:
mysql-data: