diff --git a/README.md b/README.md index 8e7ad8b..7cc2371 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,46 @@ + ## About -This Telegram bot was made with the purpose of downloading media from YouTube/Youtube Music -## Demonstration!![telebot](https://user-images.githubusercontent.com/89523758/199017350-cd570715-e633-4f68-b198-0d37b2bf3879.gif) -## Deployment on a server -#### Windows -``` -git clone https://github.com/regularenthropy/teleDL -cd teleDL +This Telegram bot was made with the purpose of downloading media from YouTube/Youtube Music. + +## Demonstration +![telebot](https://user-images.githubusercontent.com/89523758/199017350-cd570715-e633-4f68-b198-0d37b2bf3879.gif) + +## Normal Launch + +### Windows +```sh +git clone https://github.com/regularenthropy/TelegramDL +cd TelegramDL npm install node .\main.js ``` -#### Linux -``` -git clone https://github.com/regularenthropy/teleDL -cd teleDL + +### Linux +```sh +git clone https://github.com/regularenthropy/TelegramDL +cd TelegramDL npm install node main.js ``` + +## Docker Deployment + +### Build Docker Image +```sh +docker build -t telegram-downloader . +``` + +### Run Docker Container +```sh +docker run -d --name telegram-downloader -v $(pwd)/config.yml:/usr/src/app/config.yml -e BOT_TOKEN=your_telegram_bot_token telegram-downloader +``` +Replace `your_telegram_bot_token` with your actual bot token. + ## Current roadmap -- [X] Make it crossplatform (Currently Windows only) +- [X] Make it cross-platform (Currently Windows only) - [X] Add ability to select between video/audio - [X] Add local storage support -- [ ] Optimise code +- [X] Optimize code + ## Copyright Copyright (c) 2022-2024 - regularentropy. All rights reserved. diff --git a/dockerfile b/dockerfile index 7321635..f8fa269 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,21 @@ -FROM node:22 +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install -y \ + ffmpeg \ + wget \ + curl \ + python3 \ + python3-pip \ + gnupg && \ + pip3 install mutagen && \ + apt-get clean + +RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ + apt-get install -y nodejs + +RUN wget -O /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \ + chmod a+rx /usr/local/bin/yt-dlp WORKDIR /usr/src/app