From b202012570fc70c3e06f16bf739486c4926e4232 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 10 Jan 2022 16:05:22 -0500 Subject: [PATCH] fixed up dockerfile run.sh --- Dockerfile | 22 ++++++++++++---------- config.yaml | 3 ++- run.sh | 3 +-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9609186..eff8c8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BUILD_VERSION # <--- Image Setup --> FROM homeassistant/${BUILD_ARCH}-base-python:3.9-alpine3.14 -WORKDIR /data +WORKDIR /app # <--- System Wide Dependencies --> ENV LANG C.UTF-8 @@ -16,20 +16,21 @@ RUN apk add --no-cache \ RUN pip install -U wheel setuptools pip # <--- Python Dependencies --> -COPY api/setup.py /data/setup.py -RUN pip install . /data +COPY api/setup.py /app/setup.py +RUN pip install . /app # <--- Webapp Build --> -COPY webapp/ /data/web-builder -RUN cd /data/web-builder && \ +COPY webapp/ /app/web-builder +RUN cd /app/web-builder && \ npm install && \ npm run build && \ - cp -r /data/web-builder/build /data/web && \ - rm -rf /data/web-builder + cp -r /app/web-builder/build /app/web && \ + rm -rf /app/web-builder # <--- Api Code --> -COPY api/src /data/src -COPY run.sh run.sh +COPY api/src /app/src +COPY run.sh /app/run.sh +RUN chmod +x /app/run.sh # <--- Environment Variables --> ENV HASSIO_TOKEN "" @@ -42,5 +43,6 @@ EXPOSE 8000 LABEL \ io.hass.type="addon" \ io.hass.arch="armhf|aarch64|i386|amd64" -CMD [ "/data/run.sh" ] + +CMD [ "/app/run.sh" ] diff --git a/config.yaml b/config.yaml index 8ad61b6..36827d5 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ name: Shortumation -version: 0.0.6f +version: 0.0.6g3 slug: shortumation url: "https://github.com/asosnovsky/Shortumation" description: "A homeassitant addon which provides better UI for automations & scripts." @@ -14,6 +14,7 @@ boot: auto ingress: true ingress_port: 8000 ingress_entry: "/web" +webgui: "http://[HOST]:[PORT:2839]/web" panel_icon: mdi:home-automation hassio_role: manager auth_api: true diff --git a/run.sh b/run.sh index e174e83..21da9d1 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,4 @@ #!/bin/bash -echo $(ls .) - +echo $(python --version) python -m uvicorn src.app:app --host "0.0.0.0" --port 8000