From 5d7afb230416709d71a0adeb86a12a120c6bf9cf Mon Sep 17 00:00:00 2001 From: JMARyA Date: Wed, 10 Apr 2024 10:28:28 +0200 Subject: [PATCH] docker --- Dockerfile | 16 ++++++++++++++++ docker-compose.yml | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2ba4588 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM rust:buster as builder + +COPY . /app +WORKDIR /app + +RUN cargo build --release + +FROM debian:buster + +RUN apt update && apt upgrade -y + +COPY --from=builder /app/target/release/mirrord /mirrord + +WORKDIR / + +CMD ["/mirrord"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fac0b18 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3" +services: + mirrord: + build: . + ports: + - 8080:8080 + volumes: + - ./data:/data + - ./sample.conf:/sample.conf