services:
  dsmr:
    container_name: dsmr
    depends_on:
      - dsmrdb
      - influxdb
    environment:
      - DSMRREADER_ADMIN_USER=${DSMRREADER_USER:?}
      - DSMRREADER_ADMIN_PASSWORD=${DSMRREADER_PASSWORD:?}
    image: xirixiz/dsmr-reader-docker:5.10.3-2023.04.02
    links:
      - dsmrdb:dsmrreader
    ports:
      - 8888:80
    restart: unless-stopped
    volumes:
      - /opt/dsmr/backups:/home/dsmr/app/backups
  dsmrdb:
    container_name: dsmrdb
    environment:
      - POSTGRES_DB=${DSMRDB_DATABASE:?}
      - POSTGRES_USER=${DSMRDB_USER:?}
      - POSTGRES_PASSWORD=${DSMRDB_PASSWORD:?}
    image: postgres:13.7
    ports:
      - 5432:5432
    restart: unless-stopped
    volumes:
      - /opt/dsmr/data:/var/lib/postgresql/data
