-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yaml
More file actions
95 lines (89 loc) · 2.43 KB
/
compose.yaml
File metadata and controls
95 lines (89 loc) · 2.43 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
84
85
86
87
88
89
90
91
92
93
94
95
services:
init-cache:
image: alpine:latest
command: chown -R 1001:1001 /app/data && chmod -R a=rwX /app/data
volumes:
- cache-data:/app/data
restart: "no"
redis:
image: docker.io/library/redis:latest
restart: unless-stopped
command: redis-server --save 20 1 --loglevel warning
volumes:
- redis-data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
attach: false # Don't log to stdout
fingr:
# image: ghcr.io/ways/fingr:2.6.2
build: .
restart: unless-stopped
command: ["--verbose", "--redis_host", "redis"]
ports:
- '79:7979'
volumes:
- ./deny.txt:/app/deny.txt:ro
- ./motd.txt:/app/motd.txt:ro
- ./useragent.txt:/app/useragent.txt:ro
- cache-data:/app/data
depends_on:
init-cache:
condition: service_completed_successfully
redis:
condition: service_started
cache-cleanup:
image: alpine:latest
restart: unless-stopped
command: sh -c "while true; do /cleanup-cache.sh; sleep 3600; done"
volumes:
- ./cleanup-cache.sh:/cleanup-cache.sh:ro
- cache-data:/app/data # Same volume as fingr
environment:
- CACHE_DIR=/app/data
- MAX_AGE_HOURS=12
- MIN_FREE_PERCENT=10
depends_on:
- fingr
prometheus:
image: docker.io/prom/prometheus:latest
restart: unless-stopped
command:
- '--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:
- '9090:9090'
volumes:
- ./etc/prometheus:/etc/prometheus:ro
- prometheus-data:/prometheus
depends_on:
- fingr
attach: false # Don't log to stdout
grafana:
image: docker.io/grafana/grafana:latest
restart: unless-stopped
ports:
- '3000:3000'
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_INSTALL_PLUGINS=grafana-worldmap-panel
volumes:
- ./etc/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana-data:/var/lib/grafana
depends_on:
- prometheus
attach: false # Don't log to stdout
volumes:
redis-data:
driver: local
cache-data:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local