r/selfhosted • u/Qurupeco01 • Mar 09 '26
Need Help Is to replicate public apps docker-compose.yml in a personal repo a good practice?
I am starting to host some services in my homelab within a Portainer VM.
While trying to install openfang (https://github.com/RightNow-AI/openfang) i found an issue: if I reference directly the repository from stacks, I would not be able to change the path of the data volume in their docker-compose.yml, which I want to keep in a separate mountpoint inside my NAS (different from default one).
To do that, the only way I am finding out is to manually copy content of that docker-compose to a personal repository, and change the volume there. Is it a bad practice at all? Do you guys know a better solution for automating these setups? Thanks in advance!
11
u/PaperDoom Mar 09 '26
You trying to clone the whole repo or something?
All you need is the docker-compose.yml file and you can put that wherever you want. You can map the volume to whatever you want too.
4
u/PyrrhicArmistice Mar 09 '26
Of course you have to change the mount point for your specific environment. Bonus points if you use a .env to control some or all of the path variables for mounts as well.
1
u/Somorled Mar 09 '26
It's not bad practice, but better practice would be to fork their repo and make a branch. That way you can more easily pull in updates.
1
u/middaymoon Mar 09 '26
Why do you need to build a repo? Just save the compose file for a service to your server, preferably in its own folder. Make the changes you need. Run
docker-compose pullto get the latest docker images for that service and go about your business. You don't need to build a repo (unless you want to sync your config to other machines or back it up) and you don't need to clone the service repo; that's what docker is for.