From ace27f78682090f0a3017e3583654b187f3705e6 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 13:20:52 +0100 Subject: [PATCH 01/19] Fix default checkout --- scripts/utils/prepare.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils/prepare.sh b/scripts/utils/prepare.sh index 16668ca..44ceffa 100755 --- a/scripts/utils/prepare.sh +++ b/scripts/utils/prepare.sh @@ -18,7 +18,10 @@ alias git="git -C .build/repository" if ! [ -d .build/repository ]; then git clone "${GIT_REPOSITORY}" .build/repository else - git checkout - # Checkout previous branch in case GIT_CHECKOUT was different + # Checkout default-branch in case GIT_CHECKOUT was different + defaultBranch=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') + git checkout "${defaultBranch}" + git pull # Get changes fi From d32f36dd297d1467182e2d5b73d0d585f99e4053 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 13:37:43 +0100 Subject: [PATCH 02/19] Add latest-tag to image creation --- scripts/utils/build-multiarch.sh | 1 + scripts/utils/build-ownarch.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/utils/build-multiarch.sh b/scripts/utils/build-multiarch.sh index 62520b5..f1ffb5f 100755 --- a/scripts/utils/build-multiarch.sh +++ b/scripts/utils/build-multiarch.sh @@ -5,6 +5,7 @@ EXTRA_ARGS=${EXTRA_ARGS:-"$@"} docker buildx build \ --platform $PLATFORM \ +--tag $TAG:latest \ --tag "${TAG}:${VERSION}" \ $EXTRA_ARGS \ . diff --git a/scripts/utils/build-ownarch.sh b/scripts/utils/build-ownarch.sh index f45d297..23b0923 100755 --- a/scripts/utils/build-ownarch.sh +++ b/scripts/utils/build-ownarch.sh @@ -3,6 +3,7 @@ TAG=${TAG:-"${TAG_PREFIX}${NAME}"} EXTRA_ARGS=${EXTRA_ARGS:-"$@"} docker build \ +--tag $TAG:latest \ --tag $TAG:$VERSION \ $EXTRA_ARGS \ . From b6c8457bc3b50e74ee48a7516218eca206755df6 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 18:37:17 +0100 Subject: [PATCH 03/19] Move args-declaration to build --- scripts/build.sh | 3 +++ scripts/utils/build-multiarch.sh | 1 - scripts/utils/build-ownarch.sh | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5eb74c5..78c7fca 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,6 +4,9 @@ scriptPath_file=$(dirname "${BASH_SOURCE[0]}") scriptPath_folder=$(realpath "${scriptPath_file}") utils_path="${scriptPath_folder}/utils" +# Get args without path +EXTRA_ARGS="${@:2}" + # Call prepare printf "# PREPARE\n" source ${utils_path}/prepare.sh diff --git a/scripts/utils/build-multiarch.sh b/scripts/utils/build-multiarch.sh index f1ffb5f..37d4c05 100755 --- a/scripts/utils/build-multiarch.sh +++ b/scripts/utils/build-multiarch.sh @@ -1,7 +1,6 @@ #!/bin/bash TAG=${TAG:-"${TAG_PREFIX}${NAME}"} PLATFORM=${PLATFORM:-"linux/amd64,linux/arm64/v8,linux/arm/v7"} -EXTRA_ARGS=${EXTRA_ARGS:-"$@"} docker buildx build \ --platform $PLATFORM \ diff --git a/scripts/utils/build-ownarch.sh b/scripts/utils/build-ownarch.sh index 23b0923..6b5b64c 100755 --- a/scripts/utils/build-ownarch.sh +++ b/scripts/utils/build-ownarch.sh @@ -1,6 +1,5 @@ #!/bin/bash TAG=${TAG:-"${TAG_PREFIX}${NAME}"} -EXTRA_ARGS=${EXTRA_ARGS:-"$@"} docker build \ --tag $TAG:latest \ From 85a3dbfb961dbd18e90f90cb0cd7b0242c326119 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 18:38:52 +0100 Subject: [PATCH 04/19] Use Workdir-variable from arg --- scripts/build.sh | 11 +++++++++++ scripts/utils/build-multiarch.sh | 2 +- scripts/utils/build-ownarch.sh | 2 +- scripts/utils/prepare.sh | 20 +++++++++++++------- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 78c7fca..545928c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,9 +4,16 @@ scriptPath_file=$(dirname "${BASH_SOURCE[0]}") scriptPath_folder=$(realpath "${scriptPath_file}") utils_path="${scriptPath_folder}/utils" +WORKDIR=${1:-$PWD} +WORKDIR=$(realpath "$WORKDIR") + +# Store original path +ORIGINALDIR=$PWD + # Get args without path EXTRA_ARGS="${@:2}" + # Call prepare printf "# PREPARE\n" source ${utils_path}/prepare.sh @@ -15,3 +22,7 @@ source ${utils_path}/prepare.sh printf "# BUILD\n" build_type=${BUILD:-"ownarch"} source ${utils_path}/build-${build_type}.sh + + +# Switch back to original path +cd $ORIGINALDIR diff --git a/scripts/utils/build-multiarch.sh b/scripts/utils/build-multiarch.sh index 37d4c05..15444b7 100755 --- a/scripts/utils/build-multiarch.sh +++ b/scripts/utils/build-multiarch.sh @@ -7,4 +7,4 @@ docker buildx build \ --tag $TAG:latest \ --tag "${TAG}:${VERSION}" \ $EXTRA_ARGS \ -. +$WORKDIR diff --git a/scripts/utils/build-ownarch.sh b/scripts/utils/build-ownarch.sh index 6b5b64c..95b25a7 100755 --- a/scripts/utils/build-ownarch.sh +++ b/scripts/utils/build-ownarch.sh @@ -5,4 +5,4 @@ docker build \ --tag $TAG:latest \ --tag $TAG:$VERSION \ $EXTRA_ARGS \ -. +"$WORKDIR" diff --git a/scripts/utils/prepare.sh b/scripts/utils/prepare.sh index 44ceffa..19fad32 100755 --- a/scripts/utils/prepare.sh +++ b/scripts/utils/prepare.sh @@ -2,26 +2,32 @@ # --- VARIABLES --- # Load variables -source $PWD/info.env +source $WORKDIR/info.env # Check if certain vars are overwritten, set them if missing if [ "${NAME}" = "" ]; then - NAME="$(basename $PWD)" + NAME="$(basename $WORKDIR)" fi export NAME printf "Name: ${NAME}\n" +repositoryFolder="$WORKDIR/.build/repository" # --- SOURCES --- -alias git="git -C .build/repository" # Get sources locally -if ! [ -d .build/repository ]; then - git clone "${GIT_REPOSITORY}" .build/repository -else +if ! [ -d "$repositoryFolder" ]; then + git clone "${GIT_REPOSITORY}" . + cloned=True +fi + +# Change into repository +cd "$repositoryFolder" + +if [ "$cloned" != True ]; then # Checkout default-branch in case GIT_CHECKOUT was different defaultBranch=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') git checkout "${defaultBranch}" - + git pull # Get changes fi From 019a6d3f639c3b9b1ca147c620e67be5d475810d Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 18:57:24 +0100 Subject: [PATCH 05/19] Move tag to build.sh --- scripts/build.sh | 3 +++ scripts/utils/build-multiarch.sh | 1 - scripts/utils/build-ownarch.sh | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 545928c..10ff367 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -7,12 +7,15 @@ utils_path="${scriptPath_folder}/utils" WORKDIR=${1:-$PWD} WORKDIR=$(realpath "$WORKDIR") +# -- VARIABLES -- # Store original path ORIGINALDIR=$PWD # Get args without path EXTRA_ARGS="${@:2}" +TAG=${TAG:-"${TAG_PREFIX}${NAME}"} + # Call prepare printf "# PREPARE\n" diff --git a/scripts/utils/build-multiarch.sh b/scripts/utils/build-multiarch.sh index 15444b7..56794c4 100755 --- a/scripts/utils/build-multiarch.sh +++ b/scripts/utils/build-multiarch.sh @@ -1,5 +1,4 @@ #!/bin/bash -TAG=${TAG:-"${TAG_PREFIX}${NAME}"} PLATFORM=${PLATFORM:-"linux/amd64,linux/arm64/v8,linux/arm/v7"} docker buildx build \ diff --git a/scripts/utils/build-ownarch.sh b/scripts/utils/build-ownarch.sh index 95b25a7..1f43303 100755 --- a/scripts/utils/build-ownarch.sh +++ b/scripts/utils/build-ownarch.sh @@ -1,5 +1,4 @@ #!/bin/bash -TAG=${TAG:-"${TAG_PREFIX}${NAME}"} docker build \ --tag $TAG:latest \ From dfb6fc687039f6200d59cc6a629bda53d223efea Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 19:01:36 +0100 Subject: [PATCH 06/19] Ignore build-folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30bcfa4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.build/ From 0354046e3c0aa9a1cfb47162dd2bee4fd968863c Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 19:09:11 +0100 Subject: [PATCH 07/19] Add Instructions on how to use project --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6d6370..b6f1b8f 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,41 @@ Collection of Dockerfiles created to build & pack various tools.
-- [1. Tools](#1-tools) +- [1. How to use](#1-how-to-use) + - [1.1. CLI](#11-cli) +- [2. Tools](#2-tools)
-# 1. Tools +# 1. How to use + +Run the build-script `script/build.sh` with the path to the tool you want to build. + +
+ +The docker-image will be tagged with `default` and the detected version/commit-hash. + +You can add more tags or change the existing tag-naming-scheme using the environment-variable `TAG`. + +
+ +## 1.1. CLI + +`script/build.sh [extra-args for docker build ..]` + +
+ +### 1.1.1. Environment-Variables + +Variable | Description | Default +-|-|- +`TAG` | Tag for Docker-building | `TAGPREFIX` + `NAME` +`TAGPREFIX` | Set a prefix to the default-tag | - +`NAME` | Change the name used in the tag | *FolderName* + +
+ +# 2. Tools Nothing yet From 3aeac81cf44aac3f4e98ce116d9751e0212da370 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 19:30:22 +0100 Subject: [PATCH 08/19] Fix wrong path in clone --- scripts/utils/prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/prepare.sh b/scripts/utils/prepare.sh index 19fad32..417c069 100755 --- a/scripts/utils/prepare.sh +++ b/scripts/utils/prepare.sh @@ -16,7 +16,7 @@ repositoryFolder="$WORKDIR/.build/repository" # --- SOURCES --- # Get sources locally if ! [ -d "$repositoryFolder" ]; then - git clone "${GIT_REPOSITORY}" . + git clone "${GIT_REPOSITORY}" "$repositoryFolder" cloned=True fi From a5ef65e47f60fa7c12630f90569e38150a05a059 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 23 Nov 2022 20:03:37 +0100 Subject: [PATCH 09/19] Switch script-header to bash --- scripts/build.sh | 2 +- scripts/utils/prepare.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 10ff367..0d363c9 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash scriptPath_file=$(dirname "${BASH_SOURCE[0]}") scriptPath_folder=$(realpath "${scriptPath_file}") diff --git a/scripts/utils/prepare.sh b/scripts/utils/prepare.sh index 417c069..5a618c6 100755 --- a/scripts/utils/prepare.sh +++ b/scripts/utils/prepare.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # --- VARIABLES --- # Load variables From 9960842516c950bfaba5deecf0352ad94aa3b0d1 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 4 Apr 2023 11:15:59 +0200 Subject: [PATCH 10/19] Add instructions for synapse-compress --- tools/synapse-compress-state/Dockerfile | 26 +++++++++++++++++++++++++ tools/synapse-compress-state/info.env | 1 + 2 files changed, 27 insertions(+) create mode 100644 tools/synapse-compress-state/Dockerfile create mode 100644 tools/synapse-compress-state/info.env diff --git a/tools/synapse-compress-state/Dockerfile b/tools/synapse-compress-state/Dockerfile new file mode 100644 index 0000000..583b7ba --- /dev/null +++ b/tools/synapse-compress-state/Dockerfile @@ -0,0 +1,26 @@ +# ---- Base ---- +FROM alpine AS base +WORKDIR /app +# Install dependencies +RUN apk add --no-cache libgcc libssl1.1 libc6-compat + +# ---- Build ---- +FROM rust:alpine3.16 AS build +WORKDIR /build +# Install packages +RUN apk add python3 musl-dev pkgconfig openssl-dev make +# Set build-flags +ENV RUSTFLAGS="-C target-feature=-crt-static" +# Copy sources +ADD .build/repository/ . +# Update dependencies and Compile +RUN cargo update && cargo build --release + + +# ---- Release ---- +FROM base AS release +# Copy build-target +COPY --from=build /build/target/release/synapse_compress_state . +COPY --from=build /build/target/release/synapse_auto_compressor . + +ENTRYPOINT ["./synapse_compress_state"] diff --git a/tools/synapse-compress-state/info.env b/tools/synapse-compress-state/info.env new file mode 100644 index 0000000..e15b00c --- /dev/null +++ b/tools/synapse-compress-state/info.env @@ -0,0 +1 @@ +GIT_REPOSITORY=https://github.com/matrix-org/rust-synapse-compress-state From 9cca8016c4b9054adc80011ae57d8ebdbba87938 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 4 Apr 2023 13:42:29 +0200 Subject: [PATCH 11/19] First version of auto-editor --- tools/auto-editor/Dockerfile | 23 +++++++++++++++++++++++ tools/auto-editor/info.env | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 tools/auto-editor/Dockerfile create mode 100644 tools/auto-editor/info.env diff --git a/tools/auto-editor/Dockerfile b/tools/auto-editor/Dockerfile new file mode 100644 index 0000000..e183d8e --- /dev/null +++ b/tools/auto-editor/Dockerfile @@ -0,0 +1,23 @@ +# ---- Base ---- +FROM python:slim AS base +#ENV PYTHONDONTWRITEBYTECODE=1 +WORKDIR /app +# Install packages +RUN apt update && apt install -y ffmpeg && rm -rf /var/lib/apt/lists/* +#RUN pip install --no-compile --no-cache-dir ae-ffmpeg +#COPY .build/repository/ae-ffmpeg/ae_ffmpeg/Darwin-x86_64/* /usr/bin/ + +# ---- Build ---- +FROM base AS build +ENV PYTHONDONTWRITEBYTECODE=1 +# Copy sources +ADD .build/repository/auto_editor auto_editor +ADD .build/repository/setup.py . +ADD .build/repository/README.md . +# Run install +RUN pip install --no-compile --no-cache-dir -e . + +# ---- Release ---- +FROM build AS release + +ENTRYPOINT ["auto-editor"] diff --git a/tools/auto-editor/info.env b/tools/auto-editor/info.env new file mode 100644 index 0000000..fab8c9d --- /dev/null +++ b/tools/auto-editor/info.env @@ -0,0 +1,2 @@ +GIT_REPOSITORY=https://github.com/WyattBlue/auto-editor +TAG=latest-tag From 2baaf6f6fd36c87d9c56b6acb88f6817262407ed Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 5 Apr 2023 20:24:55 +0200 Subject: [PATCH 12/19] Add workdir to release --- tools/auto-editor/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/auto-editor/Dockerfile b/tools/auto-editor/Dockerfile index e183d8e..d1efce1 100644 --- a/tools/auto-editor/Dockerfile +++ b/tools/auto-editor/Dockerfile @@ -19,5 +19,6 @@ RUN pip install --no-compile --no-cache-dir -e . # ---- Release ---- FROM build AS release +WORKDIR /videos ENTRYPOINT ["auto-editor"] From 2c1756228f208ce3fe953082d901c9e5655e14a0 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 5 Apr 2023 20:28:45 +0200 Subject: [PATCH 13/19] Add documentation --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 15371d2..61a05a2 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Collection of Dockerfiles created to build & pack various tools. - [1.1. CLI](#11-cli) - [2. Tools](#2-tools) - [2.1. Bandwhich](#21-bandwhich) + - [2.2. auto-editor](#22-auto-editor)
@@ -57,3 +58,25 @@ https://github.com/imsnif/bandwhich ``` docker run -it --net host bandwhich -i eth0 ``` + +
+ +## 2.2. auto-editor + +### 2.2.1. Source +>Auto-Editor is a command line application for automatically editing video and audio by analyzing a variety of methods, most notably audio loudness. + +https://github.com/WyattBlue/auto-editor + +
+ +### 2.2.2. Example +Speed-up silent part of videos: +``` +docker run -v /home/ruakij/Videos:/video auto-build --no-open --silent-speed 8 --margin 0.2sec "input.webm" -o edited.mp4 +``` + +
+ +### 2.2.3. Comment +TODO: Unfortunately the tool requires ffmpeg which is a huge tool and blows up the size of the image. I have to find a way to use a minimized version of it. From 36aa46c4861467c1aff95c2d0b80ce4799fe9254 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 5 Apr 2023 20:36:18 +0200 Subject: [PATCH 14/19] Add documentation --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 61a05a2..06b6a20 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Collection of Dockerfiles created to build & pack various tools. - [2. Tools](#2-tools) - [2.1. Bandwhich](#21-bandwhich) - [2.2. auto-editor](#22-auto-editor) + - [2.3. synapse-compress-state](#23-synapse-compress-state)
@@ -80,3 +81,20 @@ docker run -v /home/ruakij/Videos:/video auto-build --no-open --silent-speed 8 - ### 2.2.3. Comment TODO: Unfortunately the tool requires ffmpeg which is a huge tool and blows up the size of the image. I have to find a way to use a minimized version of it. + +
+ +## 2.3. synapse-compress-state +Includes synapse_auto_compressor + +### 2.3.1. Source +>This workspace contains experimental tools that attempt to reduce the number of rows in the state_groups_state table inside of a Synapse Postgresql database. + +https://github.com/matrix-org/rust-synapse-compress-state + +
+ +### 2.3.2. Example +``` +docker run --net container:synapse synapse-compress-state synapse_auto_compressor -p postgresql://synapse:synapse@127.0.0.1/synapse -c 500 -n 100 +``` From b0a6f904c9edd316f239370903b68dab2822a678 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 9 May 2023 22:20:28 +0200 Subject: [PATCH 15/19] Fix naming in docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06b6a20..bc38171 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Collection of Dockerfiles created to build & pack various tools. # 1. How to use -Run the build-script `script/build.sh` with the path to the tool you want to build. +Run the build-script `scripts/build.sh` with the path to the tool you want to build.
@@ -30,7 +30,7 @@ You can add more tags or change the existing tag-naming-scheme using the environ ## 1.1. CLI -`script/build.sh [extra-args for docker build ..]` +`scripts/build.sh [extra-args for docker build ..]`
From c99e9b07c2ea2517db5a7adb60f0a07650334973 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 9 May 2023 22:20:39 +0200 Subject: [PATCH 16/19] Add example for using CLI --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bc38171..7172b24 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,12 @@ You can add more tags or change the existing tag-naming-scheme using the environ
-### 1.1.1. Environment-Variables +### 1.1.1. Example +`scripts/build.sh tools/bandwhich/` + +
+ +### 1.1.2. Environment-Variables Variable | Description | Default -|-|- From a760df23a752f904222e5a9f2ed2b0cee99bd7b6 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 9 May 2023 23:51:44 +0200 Subject: [PATCH 17/19] Fix compile not working due to different folders --- tools/synapse-compress-state/Dockerfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/synapse-compress-state/Dockerfile b/tools/synapse-compress-state/Dockerfile index 583b7ba..765a6b4 100644 --- a/tools/synapse-compress-state/Dockerfile +++ b/tools/synapse-compress-state/Dockerfile @@ -13,14 +13,20 @@ RUN apk add python3 musl-dev pkgconfig openssl-dev make ENV RUSTFLAGS="-C target-feature=-crt-static" # Copy sources ADD .build/repository/ . + +FROM build AS build-synapse_compress-state # Update dependencies and Compile RUN cargo update && cargo build --release +FROM build AS build-synapse_auto_compressor +# Update dependencies and Compile +RUN cd synapse_auto_compressor/ && cargo update && cargo build --release + # ---- Release ---- FROM base AS release -# Copy build-target -COPY --from=build /build/target/release/synapse_compress_state . -COPY --from=build /build/target/release/synapse_auto_compressor . +## Copy build-target +COPY --from=build-synapse_compress-state /build/target/release/synapse_compress_state . +COPY --from=build-synapse_auto_compressor /build/target/release/synapse_auto_compressor . ENTRYPOINT ["./synapse_compress_state"] From 8304f68e4ef70561160b8a1bb97b8acda8a8b37a Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 9 May 2023 23:52:34 +0200 Subject: [PATCH 18/19] Fix env naming and location --- scripts/build.sh | 1 - scripts/utils/prepare.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 0d363c9..dc55d30 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -14,7 +14,6 @@ ORIGINALDIR=$PWD # Get args without path EXTRA_ARGS="${@:2}" -TAG=${TAG:-"${TAG_PREFIX}${NAME}"} # Call prepare diff --git a/scripts/utils/prepare.sh b/scripts/utils/prepare.sh index 5a618c6..8159b74 100755 --- a/scripts/utils/prepare.sh +++ b/scripts/utils/prepare.sh @@ -51,5 +51,5 @@ fi export VERSION printf "Version: ${VERSION}\n" -TAG=${TAG:-"${TAG_PREFIX}${NAME}"} +TAG=${TAG:-"${TAGPREFIX}${NAME}"} printf "> ${TAG}\n" From b5c5ed1b1259efd036074a10f3640e6143c99db1 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Wed, 10 May 2023 00:28:41 +0200 Subject: [PATCH 19/19] Use pre-build image in example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06b6a20..8acd29c 100644 --- a/README.md +++ b/README.md @@ -96,5 +96,5 @@ https://github.com/matrix-org/rust-synapse-compress-state ### 2.3.2. Example ``` -docker run --net container:synapse synapse-compress-state synapse_auto_compressor -p postgresql://synapse:synapse@127.0.0.1/synapse -c 500 -n 100 +docker run --net container:synapse ghcr.io/ruakij/dockerbuilds/synapse-compress-state:latest synapse_auto_compressor -p postgresql://synapse:synapse@127.0.0.1/synapse -c 500 -n 100 ```