-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.example.yaml
executable file
·77 lines (73 loc) · 1.8 KB
/
docker-compose.example.yaml
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
version: '3'
services:
dsmrdb:
# When using Postgres, release 13.x, 14.x, 15.x, and 16.x are supported only
# due to the limited availability of client packages, especially for arm32v7
image: postgres:16-alpine
container_name: dsmrdb
restart: always
volumes:
- ./dsmrdb:/var/lib/postgresql/data
environment:
- TZ=Europe/Amsterdam
- PG_TZ=Europe/Amsterdam
- POSTGRES_USER=dsmrreader
- POSTGRES_PASSWORD=dsmrreader
- POSTGRES_DB=dsmrreader
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
- ./dsmr_backups:/app/backups
environment:
- TZ=Europe/Amsterdam
- DJANGO_TIME_ZONE=Europe/Amsterdam
- VIRTUAL_HOST=localhost
- FILE__SECRET=/run/secrets/a_secret_file
secrets:
- a_secret_file
ports:
- 7777:80
- 7779:443
devices:
- "/dev/ttyUSB1:/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
secrets:
a_secret_file:
file : somedir/my_secret.txt
volumes:
dsmrdb: null
dsmrdb_backups: null