Closed pineapples5972 closed 11 months ago
I've never used docker before, but my guess is that the problem here is that the setting allow_foreign_addresses
is False by default. You need to set that to True, as you can see in https://hub.docker.com/r/rusian/yt-local/
You will also need allow_foreign_post_requests
to be True if you want write-access features like adding to playlists or changing settings. Of course if you're hosting this on a VPS, you will want some authentication mechanism so the public cannot access it.
Thanks man its working now what I did now is I changed those settings you mentioned and added -r flag in python3 server.py -r
to reload all modules.
It turn out it wasnt reloading settings even after I edited settings.py file.
Now this is my edited dockerfile which is working.
FROM python:3.10
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
RUN . venv/bin/activate
EXPOSE 8080
CMD ["bash", "-c", "python server.py -r"]
Note: This will not pull the original fork but in whichever directory you saved it as Dockerfile it will build the image from it.
also note that this docker file relies on virtualenv commands ran before dockerizing the application so run virtualenv -p python3 venv
before dockerizing it.
to build the image run:
docker build -t yt-local .
to run:
docker run -d -p 8080:8080 --name yt-local yt-local
I could manage to create a container for youtube-local. But in container, tor routing don't work. Is there a way to make work tor routing while app working in container?
Containerizing is efficient way to ship and deploy application on various servers and platforms. I am having trouble particular to this application no matter which fork I try to containerize. However there is a Docker Image already available [link] however it lacks certain features that even original fork provide like settings interface for example. A dockerfile would be great to build the image and deploy it. I tried using bard, chat gpt anything but couldnt get the service deploy correctly. And always get this error in browser "Error Connection Reset".
For example try running this dockerfile
Build using:
docker build -t youtube-local .
Run using
docker run -p 8080:8080 youtube-local
at the end you will the "connection reset error" in browser.