From 235c91748cb202ed378bd56a46e5984f8d2c25cc Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Wed, 15 Nov 2023 06:24:07 +0100 Subject: [PATCH 1/2] Slim down the final image to the max --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2f1c9d2..5713a82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM rust:1.72.0-bookworm AS rust-builder +ENV CARGO_NET_GIT_FETCH_WITH_CLI true + COPY ./vss-rs ./build/vss-rs COPY ./ln-websocket-proxy ./build/ln-websocket-proxy @@ -47,7 +49,7 @@ RUN pnpm run build FROM nginx:bookworm -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git python3 make build-essential clang cmake libsnappy-dev openssl libpq-dev pkg-config libc6 postgresql-common postgresql-15 && rm -rf /var/lib/apt/lists/* +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postgresql-15 && rm -rf /var/lib/apt/lists/* # Copy binaries COPY --from=rust-builder /build/vss-rs/target/release/vss-rs /app/vss-rs From 0e82a34fdb9d52c929609f376be52131d1b1f59a Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Wed, 15 Nov 2023 08:23:54 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=B9=20Clean=20up=20unnecessary=20c?= =?UTF-8?q?ode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 -- Makefile | 18 +----------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5713a82..97e7662 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM rust:1.72.0-bookworm AS rust-builder -ENV CARGO_NET_GIT_FETCH_WITH_CLI true - COPY ./vss-rs ./build/vss-rs COPY ./ln-websocket-proxy ./build/ln-websocket-proxy diff --git a/Makefile b/Makefile index a194165..6ad0f48 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ verify: $(PKG_ID).s9pk install: ifeq (,$(wildcard ~/.embassy/config.yaml)) - @echo; echo "You must define \"host: http://start-server-name.local\" in ~/.embassy/config.yaml config file first"; echo + @echo; echo "You must define \"host: http://server-name.local\" in ~/.embassy/config.yaml config file first"; echo else start-cli package install $(PKG_ID).s9pk endif @@ -23,22 +23,6 @@ clean: rm -rf docker-images rm -f $(PKG_ID).s9pk rm -f scripts/*.js - rm -f image.tar - -clean-manifest: - @sed -i '' '/^[[:blank:]]*#/d;s/#.*//' manifest.yaml - @echo; echo "Comments successfully removed from manifest.yaml file."; echo - -# BEGIN REBRANDING -rebranding: - @read -p "Enter new package ID name (must be a single word): " NEW_PKG_ID; \ - read -p "Enter new package title: " NEW_PKG_TITLE; \ - find . \( -name "*.md" -o -name ".gitignore" -o -name "manifest.yaml" -o -name "*Service.yml" \) -type f -not -path "./mutiny-startos/*" -exec sed -i '' -e "s/mutiny-startos/$$NEW_PKG_ID/g; s/Mutiny/$$NEW_PKG_TITLE/g" {} +; \ - echo; echo "Rebranding complete."; echo " New package ID name is: $$NEW_PKG_ID"; \ - echo " New package title is: $$NEW_PKG_TITLE"; \ - sed -i '' -e '/^# BEGIN REBRANDING/,/^# END REBRANDING/ s/^#*/#/' Makefile - @echo; echo "Note: Rebranding code has been commented out in Makefile"; echo -# END REBRANDING scripts/embassy.js: $(TS_FILES) deno bundle scripts/embassy.ts scripts/embassy.js