-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
39 lines (35 loc) · 964 Bytes
/
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
version: '3.8'
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: password123
POSTGRES_USER: user123
POSTGRES_DB: db123
backend:
container_name: express_backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
- db # Ensures that the database starts before the backend
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- "9090:9090" # Prometheus web UI
depends_on:
- backend # Ensure the backend starts before Prometheus
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000" # Grafana web UI
depends_on:
- prometheus # Ensure Prometheus starts before Grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin # Set Grafana admin password