Setting up Confluence/BitBucket, to stack or not?

First off, I’m pretty new to containers, but I feel I’ve managed to grasp the basics. I’ve managed to set up both rTorrent and Plex at home so far, but now it’s time to start with some more serious use-cases.

I’ve decided to set up containers for Atlassian Confluence and BitBucket (we use this at work, so I thought I’d test a containerized setup at home before presenting it). I don’t quite understand how to use Rancher’s stacks yet (both in setup and how/when to use), so I’ll ask here instead of throwing random stuff at the server until I get something to work: Should I install Confluence, BitBucket and PostgreSQL in a single stack, or should I create them as separate containers?

Also, apologies if this is a stupid question. :wink:

Hi @SnorreSelmer,

a good way is to use 1 stack for 1 application because in most cases an application consists of different services (db, cache, backend-server, frontend-server,…).

For security reasons don’t mix different applications in a single stack. And each application should have its own database service.

In your case i would recommend to use one stack named “Confluence” which has all the services needed for the confluence application and one stack named “Bitbucket” which has all the services needed for the bitbucket application. If both applications need a database each stack has a database service.


This is good info, I should have enough to start now. :smiley:

Just one last question:

Would you run one database service for each application that needs it, or would you set up one database service for all of them?

For example: One “database” container and then link it to all applications that needs it, or a “confluence-db” container, one “phpbb-db” container etc, each linked to their respective application.

Yes, one database service for each application. If you use the common mysql, pgsql docker images from dockerhub it is also recommended to use only one database and one database user in a container. Otherwise you have to manage the databases manually. You don’t want to do this ;-).

So it is best practice to use mutiple database services. This way you can also update one database for a single application without impairing other applications.

Again, thanks p7k! I’ve been out for Easter, but back at it now. I’m still trying to wrap my head around this Docker-thing, but this really helps!