-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (66 loc) · 2.08 KB
/
docker-compose.yml
File metadata and controls
66 lines (66 loc) · 2.08 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
name: solar
services:
grafana:
restart: unless-stopped
image: grafana/grafana:latest
container_name: solar_grafana
labels:
traefik.enable: true
traefik.http.routers.grafana.rule: "Host(`raskobvpn.ddns.net`) && PathPrefix(`/solar`)"
traefik.http.routers.grafana.entrypoints: websecure
traefik.http.routers.grafana.tls.certresolver: myresolver
environment:
GF_SERVER_PROTOCOL: "http"
GF_SERVER_DOMAIN: "raskobvpn.ddns.net"
GF_SERVER_ROOT_URL: "https://%(domain)s/solar"
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
GF_DATE_FORMATS_INTERVAL_HOUR: "DD/MM/YYYY HH:mm"
GF_DATE_FORMATS_INTERVAL_DAY: "DD/MM"
volumes:
- grafana-data:/var/lib/grafana
networks:
- traefik
- default
healthcheck:
test: "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1"
postgres:
restart: unless-stopped
image: timescale/timescaledb:latest-pg17
container_name: solar_db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d postgres -U $${POSTGRES_USER}" ]
start_period: 30s
volumes:
- postgres_data:/var/lib/postgresql/data
webservice:
container_name: solar_backend
image: ghcr.io/jrasko/solar-monitoring:latest
environment:
DB_HOST: solar_db
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
labels:
traefik.enable: true
traefik.http.routers.webservice.rule: "Host(`raskobvpn.ddns.net`) && PathPrefix(`/solar/query`)"
traefik.http.routers.webservice.entrypoints: websecure
traefik.http.routers.webservice.tls.certresolver: myresolver
traefik.http.routers.webservice.middlewares: traefik-auth@docker
depends_on:
postgres:
condition: service_healthy
restart: true
restart: unless-stopped
networks:
- traefik
- default
# Explicitly define the persistent volume for your data storage
volumes:
grafana-data:
external: true
postgres_data:
networks:
traefik:
external: true