From 51d046de13d270aee9bd13adc7da08a66b0637f1 Mon Sep 17 00:00:00 2001 From: Lovi <62809003+Lovi-0@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:25:41 +0200 Subject: [PATCH] Restore .. --- Makefile | 5 +++++ README.md | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..656fcbd --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +build-container: + docker build -t streaming-community-api . + +run-container: + docker run --rm -it -p 8000:8000 -v ${LOCAL_DIR}:/app/Video -v ./config.json:/app/config.json streaming-community-api diff --git a/README.md b/README.md index a438884..296f247 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Make sure you have the following prerequisites installed on your system: * [ffmpeg](https://www.gyan.dev/ffmpeg/builds/) * [opnessl](https://www.openssl.org) or [pycryptodome](https://pypi.org/project/pycryptodome/) +* [nodejs](https://nodejs.org/) + ## Installation Install the required Python libraries using the following command: @@ -206,6 +208,19 @@ By default the videos will be saved in `/app/Video` inside the container, if you docker run -it -p 8000:8000 -v /path/to/download:/app/Video streaming-community-api ``` +### Docker quick setup with Make + +Inside the Makefile (install `make`) are already configured two commands to build and run the container: + +``` +make build-container + +# set your download directory as ENV variable +make LOCAL_DIR=/path/to/download run-container +``` + +The `run-container` command mounts also the `config.json` file, so any change to the configuration file is reflected immediately without having to rebuild the image. + ## Tutorial For a detailed walkthrough, refer to the [video tutorial](https://www.youtube.com/watch?v=Ok7hQCgxqLg&ab_channel=Nothing) @@ -214,4 +229,4 @@ For a detailed walkthrough, refer to the [video tutorial](https://www.youtube.co ## To do - GUI - Website api -- Add other site \ No newline at end of file +- Add other site