Benefits of running discourse in separate containers for data and web

docker

(Nesvarbu Pavarde) #1

What leverage do I gain by separating discourse installation into two or more containers. E.G. for data and web.
Will there be scenarios where I want to upgrade and rebuild web container without rebuilding data container and losing all the data in DB.


(omfg) #2

Data is never lost in a rebuild, so from stated perspective you wouldn’t gain anything.


(Nesvarbu Pavarde) #3

Lovely, so launcher transfers the data into a new container on a rebuild?


(Sam) #4

Per Advanced Troubleshooting with Docker, the database is actually stored outside the container(s).

AFAIK the main advantage of separating containers (if you’re changing nothing else about the default install) is reducing downtime when you’re running ./launcher rebuild app. However it’s a bit outside my knowledge and not something I’ve attempted doing, so I wouldn’t be surprised if there were more reasons to do it.


(Felix Freiberger) #5

Yes, this is the main reason. You also gain flexibility; for example the ability to run the database on a separate server.