metube/README.md

80 lines
2.4 KiB
Markdown
Raw Normal View History

2019-11-30 08:27:50 +00:00
# MeTube
2021-03-20 16:36:30 +00:00
![Build Status](https://github.com/alexta69/metube/actions/workflows/main.yml/badge.svg)
![Docker Pulls](https://img.shields.io/docker/pulls/alexta69/metube.svg)
2019-12-08 08:16:02 +00:00
Web GUI for youtube-dl with playlist support. Allows you to download videos from YouTube and dozens of other sites (https://ytdl-org.github.io/youtube-dl/supportedsites.html).
2019-11-30 08:27:50 +00:00
2019-12-04 15:44:30 +00:00
![screenshot1](https://github.com/alexta69/metube/raw/master/screenshot.gif)
2019-12-03 21:21:27 +00:00
2019-11-30 08:27:50 +00:00
## Run using Docker
```bash
docker run -d -p 8081:8081 -v /path/to/downloads:/downloads --user 1001:1001 alexta69/metube
```
## Run using docker-compose
```yaml
version: "3"
services:
metube:
image: alexta69/metube
container_name: metube
restart: unless-stopped
user: "1001:1001"
ports:
- "8081:8081"
volumes:
- /path/to/downloads:/downloads
```
2019-12-03 21:18:14 +00:00
## Configuration via environment variables
Certain values can be set via environment variables, using the `-e` parameter on the docker command line, or the `environment:` section in docker-compose.
2019-12-08 08:16:02 +00:00
* __DOWNLOAD_DIR__: path to where the downloads will be saved. Defaults to `/downloads` in the docker image, and `.` otherwise.
* __URL_PREFIX__: base path for the web server (for use when hosting behind a reverse proxy). Defaults to `/`.
2019-12-03 21:18:14 +00:00
2019-12-06 12:16:19 +00:00
## Running behind a reverse proxy
2019-12-08 08:16:02 +00:00
Use the following nginx configuration to run MeTube behind a reverse proxy. The extra `proxy_set_header` directives are there to make WebSocket work. Don't forget to set the URL_PREFIX environment variable to the correct value as well.
2019-12-06 12:16:19 +00:00
```
location /metube/ {
proxy_pass http://metube:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
```
2019-11-30 08:27:50 +00:00
## Build and run locally
2019-12-08 08:16:02 +00:00
Make sure you have node.js and Python 3.8 installed.
2019-11-30 08:27:50 +00:00
```bash
cd metube/ui
2019-11-30 08:27:50 +00:00
# install Angular and build the UI
npm install
node_modules/.bin/ng build
# install python dependencies
cd ..
2019-11-30 08:27:50 +00:00
pip3 install pipenv
pipenv install
# run
python3 app/main.py
```
A Docker image can be built locally (it will build the UI too):
```bash
docker build -t metube .
```
## Development notes
* The above works on Windows and MacOS as well as Linux.
2019-11-30 08:27:50 +00:00
* If you're running the server in VSCode, your downloads will go to your user's Downloads folder (this is configured via the environment in .vscode/launch.json).