-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
131 lines (124 loc) · 2.98 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3.8'
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U postgres" ]
interval: 2s
timeout: 5s
retries: 1
start_period: 1s
volumes:
- ./.db:/var/lib/postgresql/data
networks:
- indexer_net
indexer:
depends_on:
db:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile.dev
env_file:
- .env
ports:
- "3000:3000"
dns:
- 8.8.8.8
- 4.4.4.4
networks:
- indexer_net
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/metrics" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
vmagent:
container_name: vmagent
image: victoriametrics/vmagent:v1.102.1
depends_on:
- "indexer"
- "victoriametrics"
ports:
- 8429:8429
volumes:
- vmagentdata:/vmagentdata
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--promscrape.config=/etc/prometheus/prometheus.yml"
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
networks:
- indexer_net
restart: always
victoriametrics:
container_name: victoriametrics
image: victoriametrics/victoria-metrics:v1.102.1
ports:
- 8428:8428
- 8089:8089
- 8089:8089/udp
- 2003:2003
- 2003:2003/udp
- 4242:4242
volumes:
- vmdata:/storage
command:
- "--storageDataPath=/storage"
- "--graphiteListenAddr=:2003"
- "--opentsdbListenAddr=:4242"
- "--httpListenAddr=:8428"
- "--influxListenAddr=:8089"
networks:
- indexer_net
restart: always
# Grafana instance configured with VictoriaMetrics as datasource
grafana:
container_name: grafana
image: grafana/grafana:10.4.2
depends_on:
- "victoriametrics"
ports:
- 3001:3000
volumes:
- grafanadata:/var/lib/grafana
- ./grafana/provisioning/datasources/prometheus-datasource:/etc/grafana/provisioning/datasources
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json
- ./grafana/dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json
networks:
- indexer_net
restart: always
prisma-studio:
image: node:22-alpine
working_dir: /indexers
env_file:
- .env
volumes:
- ./prisma:/indexers
ports:
- "5555:5555"
command: >
sh -c "npm install prisma &&
npx prisma studio"
environment:
- NODE_ENV=development
networks:
- indexer_net
restart: always
volumes:
postgres_data: {}
vmagentdata: {}
vmdata: {}
grafanadata: {}
prisma-studio: {}
networks:
indexer_net:
driver: bridge