From 00b754727d9b16b13de7591b07d5bf0635029c4b Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 24 Aug 2022 19:54:15 +0200 Subject: Add postgres + WIP plume + fix diplonat --- cluster/prod/app/plume/build/docker-compose.yml | 8 ++++ cluster/prod/app/plume/build/plume/Dockerfile | 54 +++++++++++++++++++++++++ cluster/prod/app/plume/build/plume/README.md | 3 ++ 3 files changed, 65 insertions(+) create mode 100644 cluster/prod/app/plume/build/docker-compose.yml create mode 100644 cluster/prod/app/plume/build/plume/Dockerfile create mode 100644 cluster/prod/app/plume/build/plume/README.md (limited to 'cluster/prod/app/plume/build') diff --git a/cluster/prod/app/plume/build/docker-compose.yml b/cluster/prod/app/plume/build/docker-compose.yml new file mode 100644 index 0000000..560f539 --- /dev/null +++ b/cluster/prod/app/plume/build/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3.4' +services: + plume: + build: + context: ./plume + args: + VERSION: 8709f6cf9f8ff7e3c5ee7ea699ee7c778e92fefc + image: superboum/plume:v8 diff --git a/cluster/prod/app/plume/build/plume/Dockerfile b/cluster/prod/app/plume/build/plume/Dockerfile new file mode 100644 index 0000000..1f57a52 --- /dev/null +++ b/cluster/prod/app/plume/build/plume/Dockerfile @@ -0,0 +1,54 @@ +FROM rust:1.58.1-slim-bullseye as builder + +RUN apt-get update && \ + apt-get install -y \ + pkg-config \ + git \ + curl \ + postgresql \ + postgresql-contrib \ + libpq-dev \ + gettext \ + git \ + python \ + curl \ + gcc \ + make \ + openssl \ + libssl-dev \ + libclang-dev + +ARG VERSION +WORKDIR /opt +RUN git clone -n https://git.joinplu.me/Plume/Plume.git plume + +WORKDIR /opt/plume +RUN git checkout ${VERSION} + +WORKDIR /opt/plume/script +RUN chmod a+x ./wasm-deps.sh && ./wasm-deps.sh + +WORKDIR /opt/plume +RUN cargo install wasm-pack +RUN chmod a+x ./script/plume-front.sh && ./script/plume-front.sh +RUN cargo install --path ./ --force --no-default-features --features postgres +RUN cargo install --path plume-cli --force --no-default-features --features postgres +RUN cargo clean + +#----------------------------- +FROM debian:bullseye-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + libpq5 \ + libssl1.1 \ + rclone \ + fuse + +WORKDIR /app + +COPY --from=builder /opt/plume /app +COPY --from=builder /usr/local/cargo/bin/plm /usr/local/bin/ +COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/ + +CMD ["plume"] diff --git a/cluster/prod/app/plume/build/plume/README.md b/cluster/prod/app/plume/build/plume/README.md new file mode 100644 index 0000000..6d86d81 --- /dev/null +++ b/cluster/prod/app/plume/build/plume/README.md @@ -0,0 +1,3 @@ +Try build: + +sudo docker build -t superboum/plume:v1 --build-arg VERSION=003dcf861a9f55720b03d52f2f95f5f59e338809 . -- cgit v1.2.3