forked from FakharzadehH/GoMonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (72 loc) · 1.71 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
version: "3.8"
services:
prometheus:
image: prom/prometheus
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- "9090:9090"
networks:
- app-net
grafana:
image: grafana/grafana-enterprise
container_name: grafana
restart: unless-stopped
ports:
- '3000:3000'
networks:
- app-net
volumes:
- grafana-storage:/var/lib/grafana
postgres-service:
image: postgres:15.3-alpine3.18
restart: always
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/db.sql:/docker-entrypoint-initdb.d/db.sql
networks:
- app-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
app:
image: h0si/cc-project-k8s
ports:
- "1323:1323"
environment:
APP_PORT: 1323
DB_WRITE_USERNAME: postgres
DB_WRITE_PASSWORD: postgres
DB_READ_USERNAME: postgres
DB_READ_PASSWORD: postgres
depends_on:
postgres-service:
condition: service_healthy
volumes:
- ./config.yaml:/app/config.yaml
networks:
- app-net
restart: always
volumes:
pgdata:
grafana-storage:
prometheus_data: { }
networks:
app-net:
driver: bridge