Need advice on docker compose reddit / selfhosted ---------------------------------------------------------------------- belly_hole_fire · 2023-10-24 22:17 I have been doing hosting for about a year or so and currently have HomeAssistant running from an external drive on a Pi 3 and then a Dell Optiplex 3040 with a 500gb interal HDD (soon to be SSD) and a 5TB external drive that has all the media on it. The OS is Ubuntu with docker. In Docker I currently have Jellyfin, Pi-hole and Portainer. So I feel I have some knowledge and I am very comfortable in linux since I use it as a daily driver on my laptop. I have another device where docker compose comes into play. I have an HP ProDesk 600 G2 mini that I have Promox installed on. I was finally able to figure getting lxc setup and I have docker compose installed. My question is, is it best practice to have everything in one .yaml file for compose or a folder for each docker app I want and then the .yaml fine in that folder. Right now I have pi-hole (it is not actually running) in a docker compose .yaml file and I want to install more using .yaml. Sorry for the wall of words to ask a question, but wanted to let you know what I am working with. ​ ​ ---------------------------------------------------------------------- thekrautboy · 2023-10-24 22:24 > I was finally able to figure getting lxc setup and I have docker compose installed Just fyi, it is not recommend to run Docker inside of a LXC. However plenty of people (including myself) do it, just be aware that you could run into specific issues that might be hard for a beginner to fix. > My question is, is it best practice to have everything in one .yaml file for compose or a folder for each docker app I want and then the .yaml fine in that folder. You absolutely should keep your stacks (groups of services) contained to separate compose files. For example: (Pihole) (Immich+database+machinelearning) (radarr+sonarr+qbittorrent) etc, each () being a compose stack. This allows you to then easily modify Pihole and take it up and down without interfering with the other stacks. Technically it is possible to do that when they are all together in one, but the whole reason why compose was added to basic Docker was to make things easier, and having giant single compose files is destroying a lot of the advantages of compose. This discussion comes up here frequently, and every time a handful of people will reply "but i have everything in one and it all works perfectly for me!" yes, great. I can drive my car for 50 years without wearing a seatbealt and not dying in a crash. Doesnt mean its a good idea to do it. ---------------------------------------------------------------------- belly_hole_fire · 2023-10-24 23:43 This made a lot of sense and I appreciate the you taking the time to answer. I honestly didn't understand the dd stuff since I have not used it before but it is on my list of trying to learn. With that being said, if I do used immich does it install the db and configure it or is it something I need to do. Is understanding db something I should know sooner than later? Right now my goal is to get to know compose more and also understanding procmox more. I am honestly comfortable with the containers I am using since I do not have any external facing containers but may want to in the future. ---------------------------------------------------------------------- thekrautboy · 2023-10-25 05:23 > I honestly didn't understand the dd stuff since I have not used it before but it is on my list of trying to learn. dd stuff? Do you mean db? database stuff? What did you not understand? > With that being said, if I do used immich does it install the db and configure it or is it something I need to do. That will always depend on the exact software you are using. A project like immich will tell you in the setup instructions if you can use a fresh db container and immich itself will create the databases and users etc on it for you, or if you need to prepare the db container to be used. > Is understanding db something I should know sooner than later? I dont know what you mean by that. A database is something you either need or you dont. Its usually not "maybe i will use it". > Right now my goal is to get to know compose more and also understanding procmox more. I am honestly comfortable with the containers I am using since I do not have any external facing containers but may want to in the future. Okay, then focus on that. There is no rush to learn everything as quick as possible. ---------------------------------------------------------------------- watchdog_timer · 2023-10-25 12:19 Your reply was very helpful. Thanks.