commit 6c6d7848f733bad7efe66fb5f7a5adbfbcde210f Author: samuel-p Date: Sun Sep 6 13:24:44 2020 +0200 initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..28d726f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,65 @@ +kind: pipeline +type: docker +name: linux-amd64 + +platform: + os: linux + arch: amd64 + +steps: + - name: docker + image: plugins/docker + settings: + auto_tag: true + auto_tag_suffix: linux-amd64 + repo: samuelph/synapse-compress-state + username: + from_secret: USERNAME + password: + from_secret: PASSWORD + +--- +kind: pipeline +type: docker +name: linux-arm + +platform: + os: linux + arch: arm + +steps: + - name: docker + image: plugins/docker + settings: + auto_tag: true + auto_tag_suffix: linux-arm + repo: samuelph/synapse-compress-state + username: + from_secret: USERNAME + password: + from_secret: PASSWORD + +--- +kind: pipeline +type: docker +name: manifest + +steps: + - name: publish + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + target: samuelph/synapse-compress-state + template: samuelph/synapse-compress-state:OS-ARCH + platforms: + - linux/amd64 + - linux/arm + username: + from_secret: USERNAME + password: + from_secret: PASSWORD + +depends_on: + - linux-amd64 + - linux-arm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1062418 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +*.iml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fdae271 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM rust:1.46.0 as builder + +RUN git clone https://github.com/matrix-org/rust-synapse-compress-state.git && \ + cargo install --path rust-synapse-compress-state + +FROM debian:buster-slim + +RUN apt update && \ + apt install -y postgresql-client + +COPY --from=builder /usr/local/cargo/bin/synapse-compress-state /usr/local/bin/synapse-compress-state