Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
h8pewou authored Apr 17, 2021
1 parent d46ea33 commit fe695af
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,61 @@ This is a Docker image containing Apache, PHP, ffmpeg, youtube-dl, and codepoet8
- HP Touchpad

## Usage

### Configuration

Download a sample config.php from [here](https://raw.githubusercontent.com/h8pewou/legacy_webos/main/metube-webos-config.php) or [here](https://raw.githubusercontent.com/codepoet80/metube-php-servicewrapper/main/config-sample.php). Ensure that the file_dir is set to /downloads/ (as seen in the first option). If you want to use the Youtube Search feature, you will need a Google API Key ([get your own for free here](https://developers.google.com/youtube/v3/getting-started)). This key will need to be added to your config.php as well.

Example:
```bash
wget https://raw.githubusercontent.com/h8pewou/legacy_webos/main/metube-webos-config.php
```

Optionally you can create a persistent storage for your downloads. The easiest way is by creating a directory:

```bash
mkdir /path/to/downloads
```

### Docker run

You can simply run the following command to set the service up. Ensure that /path/to is replaced with the actual path.

```bash
docker run -d --name webos-legacy-youtube\
--restart=unless-stopped\
-p 8083:80\
-v /path/to/config.php:/var/www/html/config.php\
h8pewou/legacy-webos-youtube-service:latest
```

Optionally add the following argument to specify a persistent /downloads volume:
```
-v /path/to/downloads:/downloads
```

### Docker-compose

Alternatively you can use the following docker-compose.yml:

```
version: '3.9'
networks:
bridge:
driver: bridge
services:
wrapper:
image: h8pewou/legacy-webos-youtube-service:latest
networks:
- bridge
ports:
- "8083:80"
restart: unless-stopped
volumes:
- /path/to/config.php:/var/www/html/config.php
- /path/to/downloads:/downloads # Optional
```

Ensure that /path/to is replaced with the actual path. Issue ```docker-compose up``` to start the service.

0 comments on commit fe695af

Please sign in to comment.