aboutsummaryrefslogtreecommitdiff
path: root/app/build/plume/Dockerfile
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-10-14 21:27:43 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-10-14 21:27:43 +0200
commit25ec221248904c14bf1e7283620121c52c244437 (patch)
tree17f654007251a243c190860c4b58a53e5c19260c /app/build/plume/Dockerfile
parentfcbb788de6391b88485d442ac5e8180602933eed (diff)
downloadinfrastructure-25ec221248904c14bf1e7283620121c52c244437.tar.gz
infrastructure-25ec221248904c14bf1e7283620121c52c244437.zip
WIP plume container
Diffstat (limited to 'app/build/plume/Dockerfile')
-rw-r--r--app/build/plume/Dockerfile25
1 files changed, 21 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