From 3088e6feaa7a31ed00eb5c2bebc58f66f4aedeea Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Sun, 22 Sep 2024 11:33:45 +0000 Subject: [PATCH 1/7] Add basic structure and deps --- rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/dependencies.d/base | 0 rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/base | 0 rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/ghostfolio | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/ghostfolio | 0 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx | 0 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/dependencies.d/base create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/base create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/ghostfolio create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/ghostfolio create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx diff --git a/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/dependencies.d/base b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/dependencies.d/base new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/base b/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/base new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/ghostfolio b/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/ghostfolio new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/ghostfolio b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/ghostfolio new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx new file mode 100644 index 0000000..e69de29 From a5de6eb8dfc9f55810de2259a316f5578f5b8962 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Sun, 22 Sep 2024 11:35:51 +0000 Subject: [PATCH 2/7] Move run and finish scripts --- rootfs/etc/{services.d => s6-overlay/s6-rc.d}/ghostfolio/finish | 0 rootfs/etc/{services.d => s6-overlay/s6-rc.d}/ghostfolio/run | 0 rootfs/etc/{services.d => s6-overlay/s6-rc.d}/nginx/finish | 0 rootfs/etc/{services.d => s6-overlay/s6-rc.d}/nginx/run | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/ghostfolio/finish (100%) rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/ghostfolio/run (100%) rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/nginx/finish (100%) rename rootfs/etc/{services.d => s6-overlay/s6-rc.d}/nginx/run (100%) diff --git a/rootfs/etc/services.d/ghostfolio/finish b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish similarity index 100% rename from rootfs/etc/services.d/ghostfolio/finish rename to rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish diff --git a/rootfs/etc/services.d/ghostfolio/run b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run similarity index 100% rename from rootfs/etc/services.d/ghostfolio/run rename to rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run diff --git a/rootfs/etc/services.d/nginx/finish b/rootfs/etc/s6-overlay/s6-rc.d/nginx/finish similarity index 100% rename from rootfs/etc/services.d/nginx/finish rename to rootfs/etc/s6-overlay/s6-rc.d/nginx/finish diff --git a/rootfs/etc/services.d/nginx/run b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run similarity index 100% rename from rootfs/etc/services.d/nginx/run rename to rootfs/etc/s6-overlay/s6-rc.d/nginx/run From 765adbe19956951fd8bbb4b963bc78a035f13b89 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Sun, 22 Sep 2024 11:36:52 +0000 Subject: [PATCH 3/7] Add type --- rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type | 1 + rootfs/etc/s6-overlay/s6-rc.d/nginx/type | 1 + 2 files changed, 2 insertions(+) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/nginx/type diff --git a/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type new file mode 100644 index 0000000..1780f9f --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/type b/rootfs/etc/s6-overlay/s6-rc.d/nginx/type new file mode 100644 index 0000000..1780f9f --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/nginx/type @@ -0,0 +1 @@ +longrun \ No newline at end of file From efc3759d9472cc718a54171df4142311c4396198 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 23 Sep 2024 09:22:49 +0000 Subject: [PATCH 4/7] Add exec perms --- rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish | 0 rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run | 0 rootfs/etc/s6-overlay/s6-rc.d/nginx/finish | 0 rootfs/etc/s6-overlay/s6-rc.d/nginx/run | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish mode change 100644 => 100755 rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run mode change 100644 => 100755 rootfs/etc/s6-overlay/s6-rc.d/nginx/finish mode change 100644 => 100755 rootfs/etc/s6-overlay/s6-rc.d/nginx/run diff --git a/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/finish old mode 100644 new mode 100755 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run b/rootfs/etc/s6-overlay/s6-rc.d/ghostfolio/run old mode 100644 new mode 100755 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/finish b/rootfs/etc/s6-overlay/s6-rc.d/nginx/finish old mode 100644 new mode 100755 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run old mode 100644 new mode 100755 From 97b71d92e191c66c057850575268cd33f52d9336 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 23 Sep 2024 09:23:13 +0000 Subject: [PATCH 5/7] Move labels to build.json --- Dockerfile | 6 ------ build.json | 9 +++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b63672b..3ab24a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,12 +44,6 @@ USER node ENTRYPOINT ["/init"] -LABEL \ - org.opencontainers.image.title="Home Assistant Add-on: Ghostfolio" \ - org.opencontainers.image.description="Privacy-first, open source dashboard for your personal finances." \ - org.opencontainers.image.source="https://github.com/lildude/ha-addon-ghostfolio/" \ - org.opencontainers.image.licenses="MIT" - HEALTHCHECK \ --interval=10s \ --retries=5 \ diff --git a/build.json b/build.json index 3a70ec7..aab6dd8 100644 --- a/build.json +++ b/build.json @@ -9,5 +9,14 @@ }, "codenotary": { "signer": "colin@symr.io" + }, + "labels":{ + "maintainer": "Colin Seymour (https://github.com/lildude)", + "org.opencontainers.image.authors": "Colin Seymour (https://github.com/lildude)", + "org.opencontainers.image.description": "Privacy-first, open source dashboard for your personal finances.", + "org.opencontainers.image.documentation": "https://github.com/lildude/ha-addon-ghostfolio/blob/main/DOCS.md", + "org.opencontainers.image.licenses": "MIT", + "org.opencontainers.image.source": "https://github.com/lildude/ha-addon-ghostfolio/", + "org.opencontainers.image.title": "Home Assistant Add-on: Ghostolio" } } From f7898d8da61e2ab79d1b172201746a122eb5c9a5 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 23 Sep 2024 09:23:25 +0000 Subject: [PATCH 6/7] Show labels in tests --- .github/workflows/test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 726179c..9ed074f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,3 +42,7 @@ jobs: --${{ matrix.arch }} \ --target /data/ \ --addon + + - name: Image labels + run: | + docker inspect ghcr.io/lildude/ha-addon-ghostfolio-${{ matrix.arch }} --format='{{json .Config.Labels}}' | jq From ced8c463e64850a3a83d22489a35bc6cd7b388b3 Mon Sep 17 00:00:00 2001 From: Colin Seymour Date: Mon, 23 Sep 2024 09:23:40 +0000 Subject: [PATCH 7/7] Tidy up dockerfile --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ab24a4..83b5dc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,22 +24,19 @@ RUN apt-get update && apt-get install -y \ && S6_ARCH="${BUILD_ARCH}" \ && if [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \ elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \ - && rm -rf /var/lib/apt/lists/* \ && 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 \ && 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 \ + && apt purge -y xz-utils \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ + && rm -rf /var/lib/apt/lists/* /tmp/* \ && npm install -g npm@latest COPY rootfs / -RUN chmod a+x /etc/services.d/*/run /etc/services.d/*/finish USER node ENTRYPOINT ["/init"]