mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-11-23 04:37:57 +00:00
- Ship config.ini.example in the image so a fresh install can seed config.ini. - Double % in written values; the bot reads config.ini with interpolation, so a password like abc%xyz used to break every read. - Delete add-on-managed keys from <local_dir_path>/config.ini, which the bot merges over the base file and would otherwise override them. - Move local_dir_path to /config/local so custom plugins and translations are reachable from File Editor or Samba. - Rename the ble_address option to ble_device_name to match the config key.
33 lines
1.0 KiB
Hare
33 lines
1.0 KiB
Hare
# Home Assistant add-on image.
|
|
#
|
|
# The base image already contains the repository at /app and the Python
|
|
# packages installed with pip --user for uid 1000. The Supervisor's /data
|
|
# and /config are root-owned, so this image runs as root.
|
|
#
|
|
# BuildKit sets TARGETARCH to amd64 or arm64. Home Assistant calls arm64
|
|
# aarch64; the matching stage records that name in io.hass.arch.
|
|
ARG BASE_IMAGE=ghcr.io/agessaman/meshcore-bot:latest
|
|
ARG BUILD_VERSION=dev
|
|
|
|
FROM ${BASE_IMAGE} AS addon-amd64
|
|
ARG BUILD_VERSION
|
|
LABEL io.hass.type="addon" \
|
|
io.hass.version="${BUILD_VERSION}" \
|
|
io.hass.arch="amd64"
|
|
|
|
FROM ${BASE_IMAGE} AS addon-arm64
|
|
ARG BUILD_VERSION
|
|
LABEL io.hass.type="addon" \
|
|
io.hass.version="${BUILD_VERSION}" \
|
|
io.hass.arch="aarch64"
|
|
|
|
ARG TARGETARCH=amd64
|
|
FROM addon-${TARGETARCH}
|
|
|
|
# Python disables the per-user site directory for uid 0, so put the base
|
|
# image's --user packages on PYTHONPATH explicitly.
|
|
USER root
|
|
ENV PYTHONPATH=/home/meshcore/.local/lib/python3.11/site-packages
|
|
|
|
CMD ["python3", "-m", "modules.ha_addon"]
|