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