Benefits of running discourse in separate containers for data and web

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.

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

1 Like

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

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.


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

1 Like