forked from tillsteinbach/VWsFriend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (90 loc) · 2.88 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: '3.8'
services:
vwsfriend:
image: tillsteinbach/vwsfriend:${VWSFRIEND_VERSION-latest}
ports:
- ${VWSFRIEND_PORT-4000}:${VWSFRIEND_PORT-4000}
networks:
backend:
aliases:
- vwsfriendbackend
volumes:
- vwsfriend_data:/config
environment:
- VWSFRIEND_USERNAME=${VWSFRIEND_USERNAME-admin}
- VWSFRIEND_PASSWORD=${VWSFRIEND_PASSWORD-secret}
- VWSFRIEND_PORT=${VWSFRIEND_PORT-4000}
- WECONNECT_USER
- WECONNECT_PASSWORD
- WECONNECT_SPIN
- WECONNECT_INTERVAL
- DATABASE_URL=postgresql://${DB_USER-admin}:${DB_PASSWORD-secret}@${DB_HOSTNAME-postgresdbbackend}:${DB_PORT-5432}/${DB_NAME-vwsfriend}
- ADDITIONAL_PARAMETERS=--with-database --with-abrp ${ADDITIONAL_PARAMETERS}
depends_on:
postgresdb:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: (wget -qO- http://localhost:${VWSFRIEND_PORT-4000}/healthcheck | grep "ok" -q) || exit 1
interval: 60s
timeout: 10s
retries: 3
postgresdb:
image: postgres:13
networks:
backend:
aliases:
- ${DB_HOSTNAME-postgresdbbackend}
volumes:
- postgresdb_data:/var/lib/postgresql/data
user: postgres
environment:
- POSTGRES_USER=${DB_USER-admin}
- POSTGRES_PASSWORD=${DB_PASSWORD-secret}
- POSTGRES_DB=${DB_NAME-vwsfriend}
- TZ=UTC
- PGTZ=UTC
command: -p ${DB_PORT-5432}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -p ${DB_PORT-5432} --username=${DB_USER-admin} --dbname=${DB_NAME-vwsfriend}"]
interval: 10s
timeout: 5s
retries: 5
grafana:
image: tillsteinbach/vwsfriend-grafana:${VWSFRIEND_GRAFANA_VERSION-latest}
ports:
- ${GF_SERVER_HTTP_PORT-3000}:${GF_SERVER_HTTP_PORT-3000}
networks:
bridge:
backend:
aliases:
- grafanabackend
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${VWSFRIEND_USERNAME-admin}
- GF_SECURITY_ADMIN_PASSWORD=${VWSFRIEND_PASSWORD-secret}
- GF_SERVER_HTTP_PORT=${GF_SERVER_HTTP_PORT-3000}
- DB_USER=${DB_USER-admin}
- DB_PASSWORD=${DB_PASSWORD-secret}
- DB_HOSTNAME=${DB_HOSTNAME-postgresdbbackend}
- DB_PORT=${DB_PORT-5432}
- DB_NAME=${DB_NAME-vwsfriend}
- VWSFRIEND_USERNAME=${VWSFRIEND_USERNAME-admin}
- VWSFRIEND_PASSWORD=${VWSFRIEND_PASSWORD-secret}
- VWSFRIEND_HOSTNAME=${VWSFRIEND_HOSTNAME-vwsfriendbackend}
- VWSFRIEND_PORT=${VWSFRIEND_PORT-4000}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "(wget -qO- http://localhost:${GF_SERVER_HTTP_PORT-3000}/api/health | grep '\"database\": \"ok\"' -q) || exit 1"]
interval: 60s
timeout: 10s
retries: 3
networks:
bridge:
backend:
volumes:
vwsfriend_data:
postgresdb_data:
grafana_data: