mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 13:10:30 -04:00
Update, refactor and restructure repo (#1)
* Remove unused files * Update dev env * Update config * Update docker config * Add translations * Update run script * Auto-gen enc key if not set * Replace workflows * Replace dependabot with renovate * Remove armhf * Lint * Remove armhf * Whoops * Remove stray comma * Add image * Reorder options * Split and improve docs * Add back image line * Update cw * Typo * Use correct org * Move bootstrap to run * Update scripts * Update config * Add note about database * Label in dockerfile * tmp force devcontainer version * Start implementing db creation if not exists * Create DB if doesn't exist * Update words * Remove unused file
This commit is contained in:
+25
-20
@@ -1,25 +1,23 @@
|
||||
ARG TESLAMATE_TAG
|
||||
|
||||
FROM teslamate/grafana:${TESLAMATE_TAG} as grafana
|
||||
FROM teslamate/grafana:1.28.5 as grafana
|
||||
|
||||
#---
|
||||
|
||||
FROM teslamate/teslamate:${TESLAMATE_TAG}
|
||||
FROM teslamate/teslamate:1.28.5
|
||||
|
||||
ARG ARCH
|
||||
ARG BASHIO_VERSION=0.11.0
|
||||
ARG S6_OVERLAY_VERSION=2.1.0.2
|
||||
ARG BUILD_ARCH
|
||||
ARG BASHIO_VERSION=0.16.2
|
||||
ARG S6_OVERLAY_VERSION=3.1.6.2
|
||||
|
||||
ENV \
|
||||
DEBIAN_FRONTEND="noninteractive" \
|
||||
LANG="C.UTF-8" \
|
||||
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
|
||||
S6_CMD_WAIT_FOR_SERVICES=1
|
||||
S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
USER root
|
||||
|
||||
# Commands taken from HA Ubuntu base Dockerfile but switched to wget as curl didn't work using buildx
|
||||
# https://github.com/home-assistant/docker-base/blob/master/ubuntu/amd64/Dockerfile
|
||||
RUN \
|
||||
set -x \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
@@ -29,20 +27,21 @@ RUN \
|
||||
curl \
|
||||
jq \
|
||||
nginx \
|
||||
postgresql-client \
|
||||
tzdata \
|
||||
wget \
|
||||
xz-utils \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
\
|
||||
&& wget https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.gz \
|
||||
&& tar zxvf s6-overlay-${ARCH}.tar.gz -C / \
|
||||
&& rm -f s6-overlay-${ARCH}.tar.gz \
|
||||
&& S6_ARCH="${BUILD_ARCH}" \
|
||||
&& if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
|
||||
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
|
||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" | tar xpJ -C / \
|
||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" | tar xpJ -C / \
|
||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" | tar Jxp -C / \
|
||||
&& curl -Ls "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" | tar Jxp -C / \
|
||||
&& mkdir -p /etc/fix-attrs.d \
|
||||
&& mkdir -p /etc/services.d \
|
||||
\
|
||||
&& mkdir -p /tmp/bashio \
|
||||
&& wget https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz \
|
||||
&& tar xvzf v${BASHIO_VERSION}.tar.gz --strip 1 -C /tmp/bashio \
|
||||
&& rm -f v${BASHIO_VERSION}.tar.gz \
|
||||
&& curl -Ls "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | tar xz --strip 1 -C /tmp/bashio \
|
||||
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||
&& rm -rf /tmp/bashio
|
||||
@@ -62,4 +61,10 @@ COPY --from=grafana --chown=root /dashboards /dashboards
|
||||
COPY --from=grafana --chown=root /dashboards_internal /dashboards
|
||||
|
||||
# S6-Overlay
|
||||
ENTRYPOINT ["/init"]
|
||||
ENTRYPOINT ["/init"]
|
||||
|
||||
LABEL \
|
||||
org.opencontainers.image.title="Home Assistant Add-on: TeslaMate" \
|
||||
org.opencontainers.image.description="A self-hosted data logger for your Tesla." \
|
||||
org.opencontainers.image.source="https://github.com/lildude/ha-addon-ghostfolio/" \
|
||||
org.opencontainers.image.licenses="MIT"
|
||||
Reference in New Issue
Block a user