-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.63 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
version: "3.9"
services:
# Predictor stack
predictor:
build:
dockerfile: Dockerfile
context: .
env_file: .env
volumes:
# Mount a volume under the shared nginx dir to serve static files
- ./static/:/usr/share/nginx/html/
restart: unless-stopped
predictor-nginx:
image: nginx:latest
hostname: predictor-nginx
volumes:
# Mount the same volume to serve static files
- ./static/:/usr/share/nginx/html/:ro
ports:
- 80:80
restart: unless-stopped
predictor-mosquitto:
image: eclipse-mosquitto:latest
hostname: predictor-mosquitto
ports:
- 1883:1883 # TCP
- 8883:8883 # Websockets
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
command: mosquitto -c /mosquitto/config/mosquitto.conf
restart: unless-stopped
# Monitoring
prometheus:
image: prom/prometheus:v2.32.1
hostname: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
# Mount a data volume to persist data between container restarts
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml' # Prometheus configuration
- '--storage.tsdb.retention.time=1y' # Keep data for 1 year
- '--storage.tsdb.path=/prometheus' # Store data in /prometheus
grafana:
image: grafana/grafana:9.1.8
volumes:
# Mount the provisioning config to the container
- ./grafana/provisioning:/etc/grafana/provisioning
env_file:
# Runtime environment variables
- grafana/.env
ports:
- 3000:3000
volumes:
prometheus_data:
name: prometheus-data