-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
83 lines (77 loc) · 1.9 KB
/
docker-compose.yaml
File metadata and controls
83 lines (77 loc) · 1.9 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
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
version: '3.8'
services:
kar98k:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-dev}
BUILD_TIME: ${BUILD_TIME:-unknown}
container_name: kar98k
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./configs/kar98k.yaml:/app/configs/kar98k.yaml:ro
environment:
- TZ=UTC
networks:
- kar98k-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
# Optional: Example target service for testing
target:
image: nginx:alpine
container_name: kar98k-target
ports:
- "8080:80"
networks:
- kar98k-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
interval: 10s
timeout: 5s
retries: 3
# Optional: Prometheus for metrics collection
prometheus:
image: prom/prometheus:latest
container_name: kar98k-prometheus
ports:
- "9091:9090"
volumes:
- ./configs/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
networks:
- kar98k-network
profiles:
- monitoring
# Optional: Grafana for visualization
grafana:
image: grafana/grafana:latest
container_name: kar98k-grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
networks:
- kar98k-network
profiles:
- monitoring
networks:
kar98k-network:
driver: bridge
volumes:
prometheus-data:
grafana-data: