Skip to content

Commit

Permalink
telegramdl | container: re-implement support for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
regularentropy committed Jul 20, 2024
1 parent 2fa0ade commit 74f3424
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 14 deletions.
47 changes: 34 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 18 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 74f3424

Please sign in to comment.