From 3bd36aaa3beeac644b0d0c486ce135e0be765552 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 03:36:02 +0600 Subject: [PATCH 01/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22ceaa8..0653e57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive +FROM theorangeone/rclone-mount:latest +# This image is based on alpine:3.14 RUN mkdir -p /app WORKDIR /app From 820bb78f0c1f54ef9ca78840dacf7de3fe642396 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:12:05 +0600 Subject: [PATCH 02/36] Update setup.sh --- setup.sh | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/setup.sh b/setup.sh index ca2632c..315acfa 100644 --- a/setup.sh +++ b/setup.sh @@ -1,25 +1,21 @@ #! /bin/bash -apt update && apt upgrade -y && apt install -y software-properties-common && apt update && add-apt-repository universe && add-apt-repository multiverse -apt update && apt install -y --no-install-recommends \ - python3.8 python3-pip curl wget git \ - make python-is-python3 build-essential cmake \ + apt update && apt install -y software-properties-common && \ + apt update && add-apt-repository universe && \ + add-apt-repository multiverse + +apk add --update --no-cache --update-cache \ + python3 nodejs npm \ + curl wget git \ nano \ - zip unzip p7zip-full p7zip-rar \ - ffmpeg fuse \ - rdfind + zip unzip p7zip \ +apk add --update --no-cache --update-cache \ + -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ + rdfind py3-pip yarn -# apt install -y php openssh-server -# install node v14.x including npm -curl -sL https://deb.nodesource.com/setup_14.x | bash - -apt install -y nodejs -rm -rf /var/lib/apt/lists/* -npm install -g localtunnel yarn +npm install -g localtunnel pip3 install --no-cache-dir -r requirements.txt -# install aria2c -# curl -Oaria2.deb https://tebi.com/7yhtraria2.deb - # Install TGrclonebot git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git From 69ed48178b08c67bf43cdc531620591bc2aacebc Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:15:18 +0600 Subject: [PATCH 03/36] Update start.sh --- start.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/start.sh b/start.sh index bd2297f..8a0047a 100644 --- a/start.sh +++ b/start.sh @@ -1,13 +1,5 @@ #!/bin/bash -# Install rclone static binary -wget -q https://downloads.rclone.org/v1.58.1/rclone-v1.58.1-linux-amd64.zip -unzip -q rclone-*-linux-amd64.zip -export PATH=$PWD/rclone-v1.58.1-linux-amd64:$PATH -echo "Rclone installed successfully" -# remove junk -rm -rf rclone-*-linux-amd64.zip *.txt *yml *.md - # Create rclone.conf file from base64 if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config detected" From 388fcf4fedccdfd5873c6e7c08e75112a0b4a0e5 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:23:59 +0600 Subject: [PATCH 04/36] Update setup.sh --- setup.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.sh b/setup.sh index 315acfa..44c526d 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,4 @@ #! /bin/bash - apt update && apt install -y software-properties-common && \ - apt update && add-apt-repository universe && \ - add-apt-repository multiverse apk add --update --no-cache --update-cache \ python3 nodejs npm \ From 1d0a683dfff981387bc7573532d33d90a7da125e Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:27:27 +0600 Subject: [PATCH 05/36] Update Dockerfile --- Dockerfile | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0653e57..9b19f37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,35 @@ RUN mkdir -p /app WORKDIR /app COPY . . -RUN chmod +x setup.sh && sh setup.sh -#install megatools -#install required packages to compile source -#install dependencies for megatools experimental 1.11.0 (meson also) -# apt install meson ninja-build libglib2.0-dev libcurl4-openssl-dev build-essential libssl-dev checkinstall pkg-config cmake -# RUN git clone https://megous.com/git/megatools && cd megatools && meson b && ninja -C b && ninja -C b install && rm -rf ~/megatools + +RUN apk add --update --no-cache --update-cache \ + python3 nodejs npm \ + curl wget git \ + nano \ + zip unzip p7zip \ +RUN apk add --update --no-cache --update-cache \ + -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ + rdfind py3-pip yarn + + +RUN npm install -g localtunnel +RUN pip3 install --no-cache-dir -r requirements.txt + + +# Install TGrclonebot +RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ + cd TelegramShellBot-Rclone && \ + yarn install + + + + + + + + + + CMD ["bash", "start.sh"] From 6b2d72eaf56aca59e95ad961913ea517a7629e2f Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:29:07 +0600 Subject: [PATCH 06/36] Update Dockerfile --- Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b19f37..6ef96b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN apk add --update --no-cache --update-cache \ python3 nodejs npm \ curl wget git \ nano \ - zip unzip p7zip \ + zip unzip p7zip RUN apk add --update --no-cache --update-cache \ -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ rdfind py3-pip yarn @@ -27,13 +27,4 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install - - - - - - - - - CMD ["bash", "start.sh"] From df0ca330c04b13f29c778dda89c4b18d80fb65ff Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:36:15 +0600 Subject: [PATCH 07/36] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6ef96b3..44717c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ RUN apk add --update --no-cache --update-cache \ python3 nodejs npm \ curl wget git \ nano \ - zip unzip p7zip + zip unzip p7zip \ + py-crypto RUN apk add --update --no-cache --update-cache \ -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ rdfind py3-pip yarn From bacc9adb2989fdfa6fee2267691ef3df51c6e970 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:42:36 +0600 Subject: [PATCH 08/36] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b1df116..0e825bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ yt-dlp +pycryptodomex From 46de19d80f45e7bd01b411f29963cd6bd8bb03fd Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:46:07 +0600 Subject: [PATCH 09/36] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44717c7..6c47a9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,9 @@ RUN apk add --update --no-cache --update-cache \ python3 nodejs npm \ curl wget git \ nano \ - zip unzip p7zip \ - py-crypto + zip unzip p7zip + + RUN apk add --update --no-cache --update-cache \ -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ rdfind py3-pip yarn From 6b23edb5df22cd73756e792da799f7b06caf2d66 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:52:31 +0600 Subject: [PATCH 10/36] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c47a9a..504d2d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,12 @@ RUN apk add --update --no-cache --update-cache \ python3 nodejs npm \ curl wget git \ nano \ - zip unzip p7zip + zip unzip p7zip \ + gcc RUN apk add --update --no-cache --update-cache \ - -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ + --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ rdfind py3-pip yarn From 65ad6efccd174942dfa2462a59a7997023bb1029 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 04:58:18 +0600 Subject: [PATCH 11/36] Update Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 504d2d4..e7bd079 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update --no-cache --update-cache \ curl wget git \ nano \ zip unzip p7zip \ - gcc + gcc libc-dev RUN apk add --update --no-cache --update-cache \ @@ -29,5 +29,7 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ cd TelegramShellBot-Rclone && \ yarn install +# Alpine image dependencies are below +# gcc libc-dev ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From de4ce4e113bd421e2a1459cb341096609cac17b4 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 05:01:42 +0600 Subject: [PATCH 12/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7bd079..a656beb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update --no-cache --update-cache \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev + gcc libc-dev g++ RUN apk add --update --no-cache --update-cache \ @@ -30,6 +30,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev ( python3 module : pycryptodomex ) +# gcc libc-dev g++ ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From 1ac864f3d9932afcb0939c5338e26ea3096a670b Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 05:05:49 +0600 Subject: [PATCH 13/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a656beb..1bd77e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update --no-cache --update-cache \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev g++ + gcc libc-dev g++ python3-dev RUN apk add --update --no-cache --update-cache \ @@ -30,6 +30,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev g++ ( python3 module : pycryptodomex ) +# gcc libc-dev g++ python3-dev ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From 2dc6afa598d03b738bbaa8478405c01e25a57e73 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 05:11:54 +0600 Subject: [PATCH 14/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1bd77e1..8e068a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update --no-cache --update-cache \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev g++ python3-dev + gcc libc-dev g++ python3-dev make RUN apk add --update --no-cache --update-cache \ @@ -30,6 +30,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev g++ python3-dev ( python3 module : pycryptodomex ) +# gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From 3db8a116094797e3eea4a098403d339d0e13c66a Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 20:38:04 +0600 Subject: [PATCH 15/36] Update Alpine & Rclone to Latest version (#2) * Update Dockerfile * Delete setup.sh * Update start.sh --- Dockerfile | 8 +++----- setup.sh | 21 --------------------- start.sh | 13 ++++++++----- 3 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 setup.sh diff --git a/Dockerfile b/Dockerfile index 8e068a0..449d273 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ -FROM theorangeone/rclone-mount:latest -# This image is based on alpine:3.14 +FROM alpine:edge RUN mkdir -p /app WORKDIR /app COPY . . - RUN apk add --update --no-cache --update-cache \ python3 nodejs npm \ curl wget git \ @@ -16,8 +14,8 @@ RUN apk add --update --no-cache --update-cache \ RUN apk add --update --no-cache --update-cache \ - --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ - rdfind py3-pip yarn + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ + rdfind py3-pip yarn rclone RUN npm install -g localtunnel diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 44c526d..0000000 --- a/setup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/bash - -apk add --update --no-cache --update-cache \ - python3 nodejs npm \ - curl wget git \ - nano \ - zip unzip p7zip \ -apk add --update --no-cache --update-cache \ - -X http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ - rdfind py3-pip yarn - - -npm install -g localtunnel -pip3 install --no-cache-dir -r requirements.txt - - -# Install TGrclonebot -git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git -cd TelegramShellBot-Rclone -yarn install - diff --git a/start.sh b/start.sh index 8a0047a..9cb4985 100644 --- a/start.sh +++ b/start.sh @@ -4,20 +4,23 @@ if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config detected" echo "[DRIVE]" > rclone.conf - mkdir -p $HOME/.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> $HOME/.config/rclone/rclone.conf - echo "Rclone config placed in position" + mkdir -p /.config/rclone + echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /.config/rclone/rclone.conf fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then echo "Fetching rclone.conf from url" - mkdir -p $HOME/.config/rclone - curl -o$HOME/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" + mkdir -p /.config/rclone + curl -o/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" fi +# Set /.config/rclone/rclone.conf as rclone config paths +rclone config --config="/.config/rclone/rclone.conf" +echo " Rclone Config Files is located at /.config/rclone/rclone.conf " + # Set bot token & owner ID if [[ -n $BOT_TOKEN && -n $OWNER_ID ]]; then From 09ca223f72a26b04162f1e5ac58cb8bf114ef73f Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 21:08:24 +0600 Subject: [PATCH 16/36] upgrade alpine & rclone to latest , Downgrade node to 14.19.0-r0 (#3) * Update Dockerfile * Delete setup.sh * Update start.sh * Update Dockerfile --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 449d273..70d3468 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,15 @@ COPY . . RUN apk add --update --no-cache --update-cache \ - python3 nodejs npm \ + python3 npm \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev g++ python3-dev make + gcc libc-dev g++ python3-dev make && \ + apk add --update --no-cache --update-cache \ + --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ + nodejs + RUN apk add --update --no-cache --update-cache \ From 1a8789aee97a26bdb5ce8af4ab1b9ca61e821905 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 21:14:56 +0600 Subject: [PATCH 17/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70d3468..7b2c2e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN apk add --update --no-cache --update-cache \ rdfind py3-pip yarn rclone -RUN npm install -g localtunnel +RUN npm install -g localtunnel node-pty RUN pip3 install --no-cache-dir -r requirements.txt @@ -32,6 +32,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) +# gcc libc-dev g++ python3-dev make node-pty ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From 6e05906bda80a103c0d472b5b3993364036de58d Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 21:27:51 +0600 Subject: [PATCH 18/36] Update Dockerfile --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b2c2e0..04b0b0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,11 @@ COPY . . RUN apk add --update --no-cache --update-cache \ - python3 npm \ + python3 npm nodejs \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev g++ python3-dev make && \ - apk add --update --no-cache --update-cache \ - --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main \ - nodejs - + gcc libc-dev g++ python3-dev make RUN apk add --update --no-cache --update-cache \ @@ -22,7 +18,7 @@ RUN apk add --update --no-cache --update-cache \ rdfind py3-pip yarn rclone -RUN npm install -g localtunnel node-pty +RUN npm install -g localtunnel RUN pip3 install --no-cache-dir -r requirements.txt From 506db3560af3e57c5c4f1d7dcdc62cf830385610 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:03:11 +0600 Subject: [PATCH 19/36] Update Dockerfile --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 04b0b0d..de53a4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,23 @@ -FROM alpine:edge +FROM alpine:3.14 RUN mkdir -p /app WORKDIR /app COPY . . - RUN apk add --update --no-cache --update-cache \ - python3 npm nodejs \ + python3 nodejs npm \ curl wget git \ nano \ zip unzip p7zip \ gcc libc-dev g++ python3-dev make -RUN apk add --update --no-cache --update-cache \ +RUN apk add --no-cache \ + --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ + py3-pip yarn && \ + apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - rdfind py3-pip yarn rclone + rdfind rclone RUN npm install -g localtunnel @@ -28,6 +30,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev g++ python3-dev make node-pty ( python3 module : pycryptodomex ) +# gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From 4aa36f01951ad275d9256f9c159998866a58cfde Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:52:34 +0600 Subject: [PATCH 20/36] Update start.sh --- start.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/start.sh b/start.sh index 9cb4985..3a85390 100644 --- a/start.sh +++ b/start.sh @@ -4,22 +4,22 @@ if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config detected" echo "[DRIVE]" > rclone.conf - mkdir -p /.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /.config/rclone/rclone.conf + mkdir -p $HOME/.config/rclone + echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> $HOME/.config/rclone/rclone.conf fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then echo "Fetching rclone.conf from url" - mkdir -p /.config/rclone - curl -o/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" + mkdir -p $HOME/.config/rclone + curl -o$HOME/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" fi -# Set /.config/rclone/rclone.conf as rclone config paths -rclone config --config="/.config/rclone/rclone.conf" -echo " Rclone Config Files is located at /.config/rclone/rclone.conf " +# Set $HOME/.config/rclone/rclone.conf as rclone config paths +rclone config --config="$HOME/.config/rclone/rclone.conf" +echo " Rclone Config Files is located at $HOME/.config/rclone/rclone.conf " # Set bot token & owner ID From d5e93fc6ff876ac12dea239f91f3c5fa0e8952c7 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 22:54:15 +0600 Subject: [PATCH 21/36] Update start.sh --- start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index 3a85390..48e2927 100644 --- a/start.sh +++ b/start.sh @@ -2,7 +2,7 @@ # Create rclone.conf file from base64 if [[ -n $RCLONE_CONFIG_BASE64 ]]; then - echo "Rclone config detected" + echo "Rclone config in BASE64 Format detected" echo "[DRIVE]" > rclone.conf mkdir -p $HOME/.config/rclone echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> $HOME/.config/rclone/rclone.conf @@ -11,7 +11,7 @@ fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then - echo "Fetching rclone.conf from url" + echo "Rclone config file url detected. Fetching rclone.conf . . ." mkdir -p $HOME/.config/rclone curl -o$HOME/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" From 5f9a50deca51e49d97ebc41d769975b70b5fce3c Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:01:21 +0600 Subject: [PATCH 22/36] Update start.sh --- start.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/start.sh b/start.sh index 48e2927..be1e3b6 100644 --- a/start.sh +++ b/start.sh @@ -4,22 +4,22 @@ if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config in BASE64 Format detected" echo "[DRIVE]" > rclone.conf - mkdir -p $HOME/.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> $HOME/.config/rclone/rclone.conf + mkdir -p /root/.config/rclone + echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /root/.config/rclone/rclone.conf fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then echo "Rclone config file url detected. Fetching rclone.conf . . ." - mkdir -p $HOME/.config/rclone - curl -o$HOME/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" + mkdir -p /root/.config/rclone + curl -o/root/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" fi # Set $HOME/.config/rclone/rclone.conf as rclone config paths -rclone config --config="$HOME/.config/rclone/rclone.conf" -echo " Rclone Config Files is located at $HOME/.config/rclone/rclone.conf " +# rclone config --config="/root/.config/rclone/rclone.conf" +# echo " Rclone Config Files is located at /root/.config/rclone/rclone.conf " # Set bot token & owner ID From 8ca37f3b40362b1264e835dc2cb89cc312dceb22 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:39:36 +0600 Subject: [PATCH 23/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de53a4b..43a7c53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,4 +32,4 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ # Alpine image dependencies are below # gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) -CMD ["bash", "start.sh"] +CMD bash start.sh From 2de6d8a86041e51a7040238a4aa4b9f00bc941b8 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:45:16 +0600 Subject: [PATCH 24/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43a7c53..67ffa4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app COPY . . RUN apk add --update --no-cache --update-cache \ - python3 nodejs npm \ + python3 nodejs npm bash \ curl wget git \ nano \ zip unzip p7zip \ @@ -32,4 +32,4 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ # Alpine image dependencies are below # gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) -CMD bash start.sh +CMD ["bash", "start.sh"] From 5f7a617a6001a30c0a197d70a312c410d98f4592 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:51:10 +0600 Subject: [PATCH 25/36] Update Dockerfile --- Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67ffa4f..b3d9f8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM alpine:edge RUN mkdir -p /app WORKDIR /app @@ -7,17 +7,14 @@ COPY . . RUN apk add --update --no-cache --update-cache \ python3 nodejs npm bash \ curl wget git \ - nano \ + nano rclone \ zip unzip p7zip \ gcc libc-dev g++ python3-dev make RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ - py3-pip yarn && \ - apk add --no-cache \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - rdfind rclone + py3-pip yarn RUN npm install -g localtunnel @@ -30,6 +27,6 @@ RUN git clone https://github.com/Frozen12/TelegramShellBot-Rclone.git && \ yarn install # Alpine image dependencies are below -# gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) +# bash gcc libc-dev g++ python3-dev make ( python3 module : pycryptodomex ) CMD ["bash", "start.sh"] From aef4ade50ee571b1f431b2b1d23f3b42dffa588e Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:52:18 +0600 Subject: [PATCH 26/36] Update Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 8b4228b..3adf142 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -worker: bash.start +worker: bash start.sh From 149f0867711df87bdea3c4ff05d3569daac1246a Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 00:05:43 +0600 Subject: [PATCH 27/36] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3d9f8a..ceb953e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ WORKDIR /app COPY . . RUN apk add --update --no-cache --update-cache \ - python3 nodejs npm bash \ + bash python3 nodejs npm \ curl wget git \ nano rclone \ zip unzip p7zip \ @@ -13,7 +13,7 @@ RUN apk add --update --no-cache --update-cache \ RUN apk add --no-cache \ - --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/community \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ py3-pip yarn From dcd6d006651e78db6d0de266b092acd91629e008 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 00:08:06 +0600 Subject: [PATCH 28/36] Update start.sh --- start.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/start.sh b/start.sh index be1e3b6..8b6be48 100644 --- a/start.sh +++ b/start.sh @@ -4,22 +4,22 @@ if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config in BASE64 Format detected" echo "[DRIVE]" > rclone.conf - mkdir -p /root/.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /root/.config/rclone/rclone.conf + mkdir -p /.config/rclone + echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /.config/rclone/rclone.conf fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then echo "Rclone config file url detected. Fetching rclone.conf . . ." - mkdir -p /root/.config/rclone - curl -o/root/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" + mkdir -p /.config/rclone + curl -o/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" fi -# Set $HOME/.config/rclone/rclone.conf as rclone config paths -# rclone config --config="/root/.config/rclone/rclone.conf" -# echo " Rclone Config Files is located at /root/.config/rclone/rclone.conf " +# Set /.config/rclone/rclone.conf as rclone config paths +rclone config --config="/.config/rclone/rclone.conf" +# echo " Rclone Config Files is located at /.config/rclone/rclone.conf " # Set bot token & owner ID From 2909574855d06311a5edf2f0cc49223a270c4c32 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 02:13:42 +0600 Subject: [PATCH 29/36] Update start.sh --- start.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/start.sh b/start.sh index 8b6be48..6406db6 100644 --- a/start.sh +++ b/start.sh @@ -4,22 +4,20 @@ if [[ -n $RCLONE_CONFIG_BASE64 ]]; then echo "Rclone config in BASE64 Format detected" echo "[DRIVE]" > rclone.conf - mkdir -p /.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /.config/rclone/rclone.conf + mkdir -p /root/.config/rclone + echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /root/.config/rclone/rclone.conf fi # fetch rclone.conf from url if [[ -n $RCLONE_CONFIG_URL ]]; then echo "Rclone config file url detected. Fetching rclone.conf . . ." - mkdir -p /.config/rclone - curl -o/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" + mkdir -p /root/.config/rclone + curl -o/root/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" fi -# Set /.config/rclone/rclone.conf as rclone config paths -rclone config --config="/.config/rclone/rclone.conf" -# echo " Rclone Config Files is located at /.config/rclone/rclone.conf " +# echo " Rclone Config File loaded successfully " # Set bot token & owner ID From 6c285dbe8aa9e69d81d59612e5999615a3bce6e4 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:20:47 +0600 Subject: [PATCH 30/36] Update Dockerfile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ceb953e..40118a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,17 +7,18 @@ COPY . . RUN apk add --update --no-cache --update-cache \ bash python3 nodejs npm \ curl wget git \ - nano rclone \ + nano \ zip unzip p7zip \ - gcc libc-dev g++ python3-dev make + gcc libc-dev g++ python3-dev make \ + libxml2-dev libxslt-dev curl-dev python3-dev RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ py3-pip yarn +RUN pip3 install webdavclient3 -RUN npm install -g localtunnel RUN pip3 install --no-cache-dir -r requirements.txt From 7e2147047db054f2481a1f699501c567b4607df8 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:21:33 +0600 Subject: [PATCH 31/36] Update start.sh --- start.sh | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/start.sh b/start.sh index 6406db6..47f76d8 100644 --- a/start.sh +++ b/start.sh @@ -1,24 +1,5 @@ #!/bin/bash -# Create rclone.conf file from base64 -if [[ -n $RCLONE_CONFIG_BASE64 ]]; then - echo "Rclone config in BASE64 Format detected" - echo "[DRIVE]" > rclone.conf - mkdir -p /root/.config/rclone - echo "$(echo $RCLONE_CONFIG_BASE64|base64 -d)" >> /root/.config/rclone/rclone.conf -fi - -# fetch rclone.conf from url - -if [[ -n $RCLONE_CONFIG_URL ]]; then - echo "Rclone config file url detected. Fetching rclone.conf . . ." - mkdir -p /root/.config/rclone - curl -o/root/.config/rclone/rclone.conf "$RCLONE_CONFIG_URL" - -fi - -# echo " Rclone Config File loaded successfully " - # Set bot token & owner ID if [[ -n $BOT_TOKEN && -n $OWNER_ID ]]; then From 1632daf8842f16175d0dae7424eca19dc6cbaf37 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:25:00 +0600 Subject: [PATCH 32/36] Create deploy.yml --- .github/workflows/deploy.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d091b1c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,19 @@ +name: Manually Deploy to Heroku + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: ${{secrets.HEROKU_APP_NAME}} + heroku_email: ${{secrets.HEROKU_EMAIL}} + usedocker: true + docker_heroku_process_type: web + stack: "container" + region: "us" From 3bf5bfecfeedf845c2ce8771a52e2b7a47c2455f Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:43:33 +0600 Subject: [PATCH 33/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 40118a8..c68a7ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ py3-pip yarn -RUN pip3 install webdavclient3 +RUN pip3 install webdavclient RUN pip3 install --no-cache-dir -r requirements.txt From dc9375d58ed17e3daeb57aaf3d177a7d2728f7f3 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 03:55:11 +0600 Subject: [PATCH 34/36] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c68a7ff..cd3e6ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ py3-pip yarn -RUN pip3 install webdavclient +RUN pip3 install pycurl webdavclient RUN pip3 install --no-cache-dir -r requirements.txt From 2763bfddaa67d789476a35bc128ebdb9e4b1adb8 Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 04:23:43 +0600 Subject: [PATCH 35/36] Update Dockerfile --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cd3e6ad..5562fe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,14 +10,12 @@ RUN apk add --update --no-cache --update-cache \ nano \ zip unzip p7zip \ gcc libc-dev g++ python3-dev make \ - libxml2-dev libxslt-dev curl-dev python3-dev RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - py3-pip yarn + py3-pip yarn cadaver -RUN pip3 install pycurl webdavclient RUN pip3 install --no-cache-dir -r requirements.txt From 2a656d8883d9e611be07f0a47d0cc539ed85c56b Mon Sep 17 00:00:00 2001 From: Frozen12 <31291110+Frozen12@users.noreply.github.com> Date: Thu, 16 Jun 2022 06:26:27 +0600 Subject: [PATCH 36/36] Update Dockerfile --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5562fe2..dc5018d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,7 @@ RUN apk add --update --no-cache --update-cache \ curl wget git \ nano \ zip unzip p7zip \ - gcc libc-dev g++ python3-dev make \ - + gcc libc-dev g++ python3-dev make RUN apk add --no-cache \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \