-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (59 loc) · 1.89 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
version: "3.9"
services:
grafana:
image: ghcr.io/and-mora/expenses-monitor:${tag}
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
update_config:
failure_action: rollback
order: start-first
# healthcheck:
# test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "https://localhost:3000/api/health", "--no-check-certificate" ]
# interval: 30s
# timeout: 10s
# retries: 5
# start_period: 5s
environment:
DATABASE: postgres
DB_GRAFANA_USERNAME: grafana_user
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: https://expmonitor.freeddns.org:3000
entrypoint: [ '/bin/sh', '-c', 'export DB_GRAFANA_PASSWORD=$$(cat /run/secrets/DB_GRAFANA_PASSWORD); export GF_SMTP_PASSWORD=$$(cat /run/secrets/GMAIL_PASSWORD); /run.sh' ]
ports:
- '3000:3000'
volumes:
- /etc/letsencrypt/live/expmonitor.freeddns.org/privkey.pem:/etc/grafana/grafana.key
- /etc/letsencrypt/live/expmonitor.freeddns.org/fullchain.pem:/etc/grafana/grafana.crt
- storage:/var/lib/grafana
networks:
- expenses_monitor
secrets:
- DB_GRAFANA_PASSWORD
- GMAIL_PASSWORD
renderer:
image: grafana/grafana-image-renderer:3.10.1
environment:
# Recommendation of grafana-image-renderer for optimal performance
# https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/#configuration
- RENDERING_MODE=clustered
- RENDERING_CLUSTERING_MODE=browser
- RENDERING_CLUSTERING_MAX_CONCURRENCY=5
- RENDERING_CLUSTERING_TIMEOUT=60
- RENDERING_VIEWPORT_MAX_WIDTH=1000
ports:
- '8081'
networks:
- expenses_monitor
secrets:
DB_GRAFANA_PASSWORD:
external: true
GMAIL_PASSWORD:
external: true
volumes:
storage: { }
networks:
expenses_monitor:
external: true