From 3af7b892b2189945282b73f5c1122e724fe14b1c Mon Sep 17 00:00:00 2001 From: JMARyA Date: Mon, 5 May 2025 05:17:11 +0200 Subject: [PATCH] docker --- Dockerfile | 18 ++++++++++++++++++ docker-compose.yml | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3635a90 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM rust:buster AS builder + +RUN rustup default nightly + +COPY . /app +WORKDIR /app + +RUN cargo build --release --bin herd --features herd + +FROM git.hydrar.de/navos/navos:latest + +RUN pacman-key --init && pacman-key --populate archlinux && pacman-key --populate navos && pacman -Syu --noconfirm && pacman -Syu --noconfirm openssl-1.1 + +COPY --from=builder /app/target/release/herd /herd + +WORKDIR / + +CMD ["/herd"] diff --git a/docker-compose.yml b/docker-compose.yml index 06250dd..caf61d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,3 +10,11 @@ services: - ./mosquitto/data:/mosquitto/data - ./mosquitto/log:/mosquitto/log restart: unless-stopped + + herd: + build: . + ports: + - 8080:8000 + volumes: + - ./herd:/herd + restart: unless-stopped