WIP plume container

This commit is contained in:
Quentin 2020-10-14 21:27:43 +02:00
parent fcbb788de6
commit 25ec221248
3 changed files with 29 additions and 4 deletions

View file

@ -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

View file

@ -0,0 +1,3 @@
Try build:
sudo docker build -t superboum/plume:v1 --build-arg VERSION=003dcf861a9f55720b03d52f2f95f5f59e338809 .

5
app/build/plume/plm-start Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
diesel migration run
plm search init
plume