sleepytaco / UnTube

A simple, comprehensive YouTube playlist manager web app powered by YouTube Data API V3. Built with ❤ using Django, htmx and Bootstrap.
51 stars 3 forks source link

RFC: Add Docker workflow #38

Open pataquets opened 1 year ago

pataquets commented 1 year ago

Adding a Dockerfile and optionally a Docker Compose manifest would enable a full local development/running/testing workflow (read: quick new developer onboarding). It would solve also the "Add tutorial to setup and run this project locally." ToDo item in the readme. The Dockerfile would allow a local build and run without any other requirements other than Docker (not even Python), as the build would happen inside a container. It would serve also to run the server. The built artifact could be even published as a public image on Docker Hub, working as a simple distribution method (automatable using Github Actions). As an added bonus, the Dockerfile build steps would serve as a 'live document' for instalation/run steps. I wanted to try UnTube locally and without any Dockerfile I need to install a lot of dependencies in my system :disappointed: Would you be open to add this?

noelaridan commented 1 year ago

Hello, I recently created a dockerfile and a docker-compose for this project because I wanted to try it out. I also made a small explanation to show how to get the project up and running it with docker. If you want to see it, the project is available in the Forks of this project.

pataquets commented 1 year ago

Thanks for the info and also for sharing the work @noelaridan. Indeed, it is a very well crafted work, not only the Docker part, but the documentation, too. Kudos for that. Something like this would be desirable to be in the project. If @sleepytaco is open to it, I would be happy to help with reviewing in case you feel like sending a PR. In any case, it would be very helpful for sure when I circle back to testing the software.

sleepytaco commented 1 year ago

@pataquets Thank you for your input. I agree with you that Docker would make it easier for people to get it up and running on their computers.

@noelaridan Thank you so much for taking the time and setting up the docker environment for UnTube! I really appreciate it.

To be frank, the codebase at the moment is very messy w.r.t the HTMX views and ordinary views. Mainly because back then I was adding features to UnTube on an ad-hoc basis. I wanted to get it up and running with enough features before my university started.

It's been well over a year since I've looked at the codebase and I don't have enough time to spend on it at the moment. I'd like to add more features to it. As such, I plan on re-organizing and abstracting the codebase over the summer to make it more accessible to people to play with it and modify it. And as I re-write it I plan on documenting where everything is and how to add to the codebase. As well as Dockerize it thanks to @noelaridan. My apologies for not getting to this sooner!

@pataquets I know you mentioned you wanted to try it out locally. To successfully run it locally there are a few more steps involved to successfully link Django with Google Auth. You'll need to create the Google Auth creds and add them to the database manually (I will try to streamline this process over the summer as well.) I will try to find the tutorial I referred to for this step and link it if I do. If your intentions are to add to the codebase, I'd recommend you wait until I re-write the codebase so that it makes your life easier.

I also have a few questions for you both. I am curious, are you using UnTube regularly? Rather, how are you guys finding UnTube useful? I am looking for new features to add to it as well. I am open to any new ideas.

I still pay for the hosting service because I use it to watch playlists and want to view my playlist duration progress across multiple devices lol But, I wonder how many people actively use it. I will soon put up an alert on the production site with a link to a Google form to poll how many people are actively using it and see if people have any new feature ideas I can add.

noelaridan commented 1 year ago

At first, I used it to test it, and now I use it regularly to save my playlists and to know when a video is no longer available on YouTube. I find this tool very useful, but I do not use all of these features yet.

pataquets commented 1 year ago

@sleepytaco Thanks for considering. As of now, my only intention is to just test the software, and it would be great to be able to do so without installing any packages on the OS, as I do usually. I'm not planning to code atm but I think it might help onboarding others willing to. Anyway, I'm not familiar with the codebase and if UnTube suits my needs, I would only be to add minor functionality, translate and maybe minor fixes. Not my purpose atm. Also, whatever the Google Auth steps are, Docker can in fact help with them by allowing UnTube to properly support the configuration best practices recommended by Docker (env vars, etc.). Also, my skill might be enough to help with it by adding them myself. As my (non-statistically-relevant) case shows, having an easy runnable (portable) method would help also new users.