Added Dockerfile and drone config to auto build and deploy new versions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user