Added Dockerfile and drone config to auto build and deploy new versions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-17 17:30:24 +01:00
parent 5961efa731
commit 917deb717f
3 changed files with 68 additions and 0 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM rustlang/rust:nightly-slim AS build
RUN cargo new --bin /app
RUN cargo new --lib /app/impl_cast
RUN cargo new --lib /app/google-home
COPY impl_cast/Cargo.toml /app/impl_cast
COPY google-home/Cargo.toml /app/google-home
COPY Cargo.toml Cargo.lock /app/
WORKDIR /app/
RUN --mount=type=cache,target=/usr/local/cargo/registry cargo build --release
COPY impl_cast/src/ /app/impl_cast/src/
COPY google-home/src/ /app/google-home/src/
COPY src/ /app/src/
RUN --mount=type=cache,target=/usr/local/cargo/registry set -e; touch /app/src/main.rs /app/src/lib.rs /app/google-home/src/lib.rs /app/impl_cast/src/lib.rs; cargo build --release
CMD ["/app/target/release/automation"]