From cd879e8af9cee9b48166f882816406a87f99a817 Mon Sep 17 00:00:00 2001 From: moonleay Date: Thu, 4 Apr 2024 08:51:49 +0200 Subject: [PATCH] feat: added docker support, added docker-compose.yml --- .dockerignore | 2 ++ Dockerfile | 10 ++++++++++ docker-compose.yml | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f6c313c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +/target +/data \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b48cfa6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM rust:1.77 + +WORKDIR /usr/src/app +COPY . . + +RUN apt-get update +RUN apt-get install -y cmake +RUN cargo build --release + +CMD ["/usr/src/app/target/release/rustendo"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..cb228f1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3" +services: + botendo: + container_name: botendo + image: limiteddev/rustendo:0.1.0 + environment: + TZ: "Europe/Berlin" + deploy: + resources: + limits: + cpus: "0.5" + memory: 512M + restart: unless-stopped + volumes: + - ./data:/usr/src/app/data \ No newline at end of file