From 9960842516c950bfaba5deecf0352ad94aa3b0d1 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 4 Apr 2023 11:15:59 +0200 Subject: [PATCH] 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