-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (37 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
41 lines (37 loc) · 1.07 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
# docker-compose.yml
version: '3.8'
services:
# Our existing API service
api:
container_name: scalable-model-api-container
build: .
ports:
- "8000:8000"
environment:
- API_TITLE=My Production ML API
- MODEL_VERSION=2.1.3-beta
restart: unless-stopped
# New Prometheus service for collecting metrics
prometheus:
image: prom/prometheus:v2.47.2
container_name: prometheus
ports:
- "9090:9090"
# Mount our configuration file into the container
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
# Tell Prometheus to load the configuration
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped
# New Grafana service for visualizing metrics
grafana:
image: grafana/grafana-oss:10.2.0
container_name: grafana
ports:
- "3000:3000"
# This makes Grafana automatically use our Prometheus as a data source
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
restart: unless-stopped