feat: port pneumatube to Rust on fumi-core
This commit is contained in:
parent
5dda6567af
commit
65d52bd0e9
37 changed files with 4232 additions and 1912 deletions
35
Dockerfile
35
Dockerfile
|
|
@ -1,10 +1,29 @@
|
|||
FROM python:3.13-slim
|
||||
# The build needs the fumi source for the Cargo path dependency
|
||||
# (../fumi/core), so the build context is the PARENT directory:
|
||||
# podman build -f pneumatube/Dockerfile ..
|
||||
# (docker-compose.yml already sets context ".."). Only the source files are
|
||||
# COPYed explicitly, not the whole directories: the context root is not
|
||||
# this repo, so a .dockerignore here does not apply, and sibling target/
|
||||
# and ./data trees must stay out of the image layers.
|
||||
# The fumi CLI ships in the image too, so account bootstrap needs nothing
|
||||
# but this image:
|
||||
# docker compose run --rm pneumatube \
|
||||
# fumi --key /data/gateway.key --db /data/gateway.db keygen
|
||||
FROM rust:1-slim-bookworm AS build
|
||||
WORKDIR /src
|
||||
COPY fumi/Cargo.toml fumi/Cargo.lock fumi/
|
||||
COPY fumi/core fumi/core
|
||||
COPY fumi/cli fumi/cli
|
||||
COPY pneumatube/Cargo.toml pneumatube/Cargo.lock pneumatube/
|
||||
COPY pneumatube/src pneumatube/src
|
||||
WORKDIR /src/pneumatube
|
||||
RUN cargo build --release --bin pneumatube
|
||||
RUN cargo build --release --manifest-path ../fumi/Cargo.toml --bin fumi
|
||||
|
||||
RUN pip install --no-cache-dir uv
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=build /src/pneumatube/target/release/pneumatube /usr/local/bin/pneumatube
|
||||
COPY --from=build /src/fumi/target/release/fumi /usr/local/bin/fumi
|
||||
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml uv.lock ./
|
||||
COPY src ./src
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
CMD ["uv", "run", "pneumatube"]
|
||||
CMD ["pneumatube"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue