From 86bc8b28e3f742edd3f010f32b59b2c5ca6c6ee2 Mon Sep 17 00:00:00 2001 From: trueold89 Date: Tue, 31 Oct 2023 03:49:36 +0300 Subject: [PATCH] Init Dockerfile & docker-compose --- Dockerfile | 9 +++++++++ bot.py => bot/bot.py | 0 db.py => bot/db.py | 0 func.py => bot/func.py | 0 docker-compose.yml | 14 ++++++++++++++ 5 files changed, 23 insertions(+) create mode 100644 Dockerfile rename bot.py => bot/bot.py (100%) rename db.py => bot/db.py (100%) rename func.py => bot/func.py (100%) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..79038fe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest +COPY bot /opt/bot +RUN apk update && apk add bash python3 py-pip wget icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib && pip install telebot +RUN wget https://github.com/fedarovich/qbittorrent-cli/releases/download/v1.7.22315.1/qbt-linux-alpine-x64-1.7.22315.1.tar.gz && \ + mkdir /opt/qbt && \ + tar -zxf qbt-linux-alpine-x64-1.7.22315.1.tar.gz -C /opt/qbt && \ + chmod a+x /opt/qbt/* && \ + ln -sf /opt/qbt/qbt /bin/qbt && ln -sf /opt/bot/bot.py /bin/bot +ENTRYPOINT ["/bin/bot"] diff --git a/bot.py b/bot/bot.py similarity index 100% rename from bot.py rename to bot/bot.py diff --git a/db.py b/bot/db.py similarity index 100% rename from db.py rename to bot/db.py diff --git a/func.py b/bot/func.py similarity index 100% rename from func.py rename to bot/func.py diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8d5a264 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +services: + qbitdl_bot: + image: + container_name: qbitdl_bot + volumes: + - /path/to/config:/etc/bot + - /path/to/data/:/path/to/data + restart: 'unless-stopped' + environment: + TOKEN: "" + PASS: "change_me" + QURL: ":" + QUSER: "" + QPASS: ""