-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
111 lines (103 loc) · 2.97 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
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
version: "3.9"
services:
# === Postgres DB with vector extension === #
db:
# image: ankane/pgvector
build: ./db
environment:
POSTGRES_PASSWORD: autometrics
POSTGRES_USER: autometrics
POSTGRES_DB: autometrics_demo
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# === Main Node.js API === #
api:
build: ./api
mem_limit: 512m
ports:
- "${FP_API_PORT:-8081}:8080"
- "9464:9464"
environment:
POSTGRES_PASSWORD: autometrics
POSTGRES_USER: autometrics
POSTGRES_DB: autometrics_demo
env_file:
- ./.env
volumes:
- ./api/public:/app/public
# === Python embeddings service === #
embeddings:
build: ./embeddings
mem_limit: 1g
ports:
- "${FP_EMBEDDINGS_PORT:-8082}:5000"
- "9100:9100" # node exporter
environment:
AUTOMETRICS_VERSION: 0.0.1
AUTOMETRICS_TRACKER: prometheus
env_file:
- ./.env
# === Prometheus === #
prom:
image: prom/prometheus
entrypoint: /bin/prometheus
--enable-feature=exemplar-storage
--config.file=/etc/prometheus/prometheus.yml
--storage.tsdb.path=/prometheus
--web.console.libraries=/usr/share/prometheus/console_libraries
--web.console.templates=/usr/share/prometheus/consoles
ports:
- "9099:9090"
volumes:
- prometheus_data:/prometheus
- ./prometheus/autometrics.rules.yml:/etc/prometheus/autometrics.rules.yml
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
# === Autometrics Proxy === #
am:
image: autometrics/am-proxy
ports:
- "6788:6789"
environment:
PROMETHEUS_URL: http://prom:9090
# === Grafana === #
grafana:
image: grafana/grafana
ports:
- "9011:9011"
environment:
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH: "/var/lib/grafana/dashboards/cAdvisor Dashboard.json"
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/dashboards:/var/lib/grafana/dashboards
# === cAdivsor (container stats) === #
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.2 # NOTE - They no longer update the `latest` tag, so specify a version
container_name: cadvisor
platform: linux/aarch64 # NOTE - to support m1 or m2 mac
devices:
- /dev/kmsg:/dev/kmsg
privileged: true
volumes:
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/machine-id:/etc/machine-id:ro
- /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro
# NOTE - these volumes might be sufficient on a Linux machine:
#
# volumes:
# - /:/rootfs:ro
# - /var/run:/var/run:ro
# - /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
ports:
- "8089:8080"
volumes:
postgres_data:
prometheus_data:
grafana_data: