Comment on Adding services to an existing Docker nginx container
N0x0n@lemmy.ml 10 months ago
This how I do it, not saying it’s the best way, but serves me well :).
For each type of application, 1 docker-compose.yaml. This will have all linked containers in 1 file but all your different applications are seperate !
Every application in it’s respective folder.
- home/user/docker/app1/docker-compose.yml
- home/user/docker/app2/docker-compose.yml
- home/user/docker/app3/docker-compose.yml
Everything is behind an application proxy (traefik in my case) and served with self-signed certificate.
I access all my apps through their domain name on my LAN with wireguard.
mudeth@lemmy.ca 10 months ago
Yes this is what I want to do. My question is how docker manages shared processes between these apps (for example, if app1 uses mysql and app2 also uses mysql).
Does it take up the RAM of 2 mysql processes? It seems wasteful if that’s the case, especially since I’m on a low-RAM VPS. I’m getting conflicting answers, so it looks like I’ll have to try it out and see.
N0x0n@lemmy.ml 10 months ago
Nah, that’s not how it works ! I have over 10 applications and half of them have databases, and that’s the prime objective of containers ! Less resource intensive and easier to deploy on low end machines. If I had to deploy 10 VMs for my 10 applications, my computer would not be able to handle it !
I have no idea how it works underneath, that’s a more technical question on how container engines work. But if you searx it or ask chatGPT (if you use this kind of tool) i’m sure you will find out how it works :).
mudeth@lemmy.ca 10 months ago
This is promising, thanks!