diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-10-14 21:27:43 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-10-14 21:27:43 +0200 |
commit | 25ec221248904c14bf1e7283620121c52c244437 (patch) | |
tree | 17f654007251a243c190860c4b58a53e5c19260c | |
parent | fcbb788de6391b88485d442ac5e8180602933eed (diff) | |
download | infrastructure-25ec221248904c14bf1e7283620121c52c244437.tar.gz infrastructure-25ec221248904c14bf1e7283620121c52c244437.zip |
WIP plume container
-rw-r--r-- | app/build/plume/Dockerfile | 25 | ||||
-rw-r--r-- | app/build/plume/README.md | 3 | ||||
-rwxr-xr-x | app/build/plume/plm-start | 5 |
3 files changed, 29 insertions, 4 deletions
diff --git a/app/build/plume/Dockerfile b/app/build/plume/Dockerfile index 7796fbb..9199e1e 100644 --- a/app/build/plume/Dockerfile +++ b/app/build/plume/Dockerfile @@ -1,9 +1,7 @@ -FROM debian:bullseye-slim as builder +FROM rust:1.47.0-slim-buster as builder RUN apt-get update && \ apt-get install -y \ - rustc \ - cargo \ pkg-config \ git \ curl \ @@ -32,8 +30,27 @@ RUN cargo install diesel_cli --no-default-features --features postgres --version RUN cargo install cargo-web RUN cargo web deploy -p plume-front --release # backend -RUN cargo install --no-default-features --features postgres -f +RUN cargo install --no-default-features --features postgres -f --path . # cli RUN cargo install --no-default-features --features postgres --path plume-cli +RUN cargo clean +#----------------------------- +FROM debian:bullseye-slim +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + libpq5 \ + libssl1.1 + +WORKDIR /app + +COPY --from=builder /opt/plume /app +COPY --from=builder /usr/local/cargo/bin/diesel /usr/local/bin/ +COPY --from=builder /usr/local/cargo/bin/plm /usr/local/bin/ +COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/ +COPY plm-start /usr/local/bin/ + +CMD ["plm-start"] + +EXPOSE 7878 diff --git a/app/build/plume/README.md b/app/build/plume/README.md new file mode 100644 index 0000000..6d86d81 --- /dev/null +++ b/app/build/plume/README.md @@ -0,0 +1,3 @@ +Try build: + +sudo docker build -t superboum/plume:v1 --build-arg VERSION=003dcf861a9f55720b03d52f2f95f5f59e338809 . diff --git a/app/build/plume/plm-start b/app/build/plume/plm-start new file mode 100755 index 0000000..694b8c8 --- /dev/null +++ b/app/build/plume/plm-start @@ -0,0 +1,5 @@ +#!/bin/bash + +diesel migration run +plm search init +plume |