sibbl / hass-lovelace-kindle-screensaver

This tool generates a png from a Home Assistant Lovelace view, which can be displayed on a Kindle device which has the Online Screensaver plugin installed.
MIT License
311 stars 71 forks source link

Docker Compose Error UID GID #90

Closed BenRoe closed 8 months ago

BenRoe commented 8 months ago

Hello, i get the following error if try to start the stack in Portainer.

Failure failed to deploy a stack: time="2023-11-06T15:17:18Z" level=warning msg="The \"UID\" variable is not set. Defaulting to a blank string." time="2023-11-06T15:17:18Z" level=warning msg="The \"GID\" variable is not set. Defaulting to a blank string." time="2023-11-06T15:17:18Z" level=warning msg="The \"UID\" variable is not set. Defaulting to a blank string." time="2023-11-06T15:17:18Z" level=warning msg="The \"GID\" variable is not set. Defaulting to a blank string." validating /data/compose/2/docker-compose.yml: services.dashboardToPng.volumes.0 must be a string

I also tried to add user: "$UID:$GID" to the docker-compose, but same problem.

version: "3"
...
# https://github.com/sibbl/hass-lovelace-kindle-screensaver
  dashboardToPng:
    image: sibbl/hass-lovelace-kindle-screensaver:latest
    restart: unless-stopped
    depends_on:
      - homeassistant
    environment:
      - HA_BASE_URL=http://192.168.1.1:8123
      - HA_SCREENSHOT_URL=/lovelace?kiosk
      - HA_ACCESS_TOKEN=eyJh*****
      - CRON_JOB=* * * * *
      - RENDERING_TIMEOUT=30000
      - RENDERING_DELAY=0
      - RENDERING_SCREEN_HEIGHT=1200
      - RENDERING_SCREEN_WIDTH=825
      - GRAYSCALE_DEPTH=8
      - OUTPUT_PATH=/output/cover.png
      - LANGUAGE=en
      - ROTATION=0
      - SCALING=1
    ports:
      - 5000:5000
    volumes:
      - - "/DATA/AppData/hass-lovelace-kindle-screensaver:/output"
sibbl commented 8 months ago

Hey, please check the last line, it's about the volumes entry. The first line in the volumes object starts with - - ... I suppose it will work with one single dash.

BenRoe commented 8 months ago

Many thanks for the hint. I was confused by the error message.