--- version: "3.8" services: laptop2mqtt: container_name: laptop2mqtt image: sthopeless/laptop2mqtt:${TAG-latest} environment: - MQTT_HOST=${MQTT_HOST} - MQTT_PORT=${MQTT_PORT-1883} - MQTT_USER=${MQTT_USERNAME} - MQTT_PASSWORD=${MQTT_PASSWORD} - MQTT_TOPIC=${MQTT_TOPIC-laptop2mqtt} - MQTT_QOS=1 - INTERVAL=60 - MONITORED_CONDITIONS=${SENSORS-status,capacity,energy_now,energy_full,energy_full_design,power_now,voltage_now} - BATTERY_HEALTH=1 - TIME_REMAINING=1 - SHOW_UNITS=1 - AC_ADAPTER=1 - LOG_LEVEL=${LOG_LEVEL-info} volumes: - /sys/class/power_supply:/sys/class/power_supply:ro restart: unless-stopped