-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (86 loc) · 2.08 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
version: '3'
services:
evcc:
command:
- evcc
container_name: evcc
image: evcc/evcc:latest
ports:
- 7070:7070/tcp
- 8887:8887/tcp
- 7090:7090/udp
- 9522:9522/udp
volumes:
- type: bind
source: ./data/evcc/evcc.yaml
target: /etc/evcc.yaml
- ./data/evcc/data:/root/.evcc
environment:
- EVCC_SITE_TITLE
- EVCC_NETWORK_HOST=${VIRTUAL_HOST}
restart: unless-stopped
dsmrdb:
# When using Postgres, release 13.x and 14.x are supported only
# due to the limited availability of client packages, especially for arm32v7
image: postgres:14-alpine
container_name: dsmrdb
restart: always
volumes:
- ./data/dsmrdb:/var/lib/postgresql/data
environment:
- TZ
- PG_TZ=${TZ}
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
# postgres is the default user, please update with
# the DJANGO_DATABASE_USER used for dsmr-reader-docker
# default for DSMR Reader is dsmrreader
test: [ "CMD-SHELL", "pg_isready -U dsmrreader" ]
interval: 10s
timeout: 5s
retries: 10
dsmr:
image: ghcr.io/xirixiz/dsmr-reader-docker:latest
depends_on:
dsmrdb:
condition: service_healthy
container_name: dsmr
links:
- dsmrdb
cap_add:
- NET_ADMIN
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/dsmr/dsmr_backups:/app/backups
environment:
- TZ
- VIRTUAL_HOST
- DJANGO_TIME_ZONE=${TZ}
- DJANGO_DATABASE_NAME=${POSTGRES_DB}
- DJANGO_DATABASE_USER=${POSTGRES_USER}
- DJANGO_DATABASE_PASSWORD=${POSTGRES_PASSWORD}
ports:
- 7777:80
- 7779:443
devices:
- ${P1_TTYNAME}:/dev/ttyUSB0
# healthcheck:
# disable: true
healthcheck:
test:
[
"CMD",
"curl",
"-Lsf",
"http://127.0.0.1/about",
"-o",
"/dev/null",
"-w",
"HTTP_%{http_code}"
]
interval: 10s
timeout: 5s
retries: 10