Atlassian Confluence Docker from Idalko

Hello!

I needed to install a Confluence instance for my internal testing but I wanted to use the Postgres database not the internal one.

First I had a look at the docker shipped by Atlassian:

https://hub.docker.com/r/atlassian/confluence-server/

I found a section about using external database but there was no examples. Of course I could create a docker with Postgres, create a Confluence database there, but it would take me more time than I wanted to spend on it.

Then I remembered that Idalko had a tool in Python for running dockers. I typed Idalko docker and got a link to this page:

https://hub.docker.com/r/idalko/atlassian-confluence

I was surprised, it is not a Python project anymore. It is already can be considered as a product.

Moreover there was an example how to run this docker with a Postgres database. Here is the example:

version: '3'
services:
  confluence:
    image: idalko/atlassian-confluence
    environment:
      - DISABLE_NOTIFICATIONS=TRUE
      - CONF_ARGS=-Datlassian.plugins.enable.wait=300
    volumes:
      - ./data:/opt/atlassian/confluence/data
    ports:
      - 8090:8090
    restart: always

  confluencedb:
    image: postgres:9.6
    environment:
      - POSTGRES_PASSWORD=secret
      - POSTGRES_USER=confluence
      - POSTGRES_DB=confluence
    volumes:
      - ./db:/var/lib/postgresql/data
    restart: always

I created a docker-compose.yml file out of this code and ran the following code in the terminal:

docker-compose up

Then I opened a browser and connected to this url:

http://localhost:8090

I had a standard Confluence setup page. I configured the database:

Screenshot 2020-05-12 at 11.26.16.png

Then I was asked a couple of other standard questions and I had a Confluence instance running with a Postgres database.

Also the Confluence home directory was mapped to the data folder and Postgres data to the db folder:

Screenshot 2020-05-12 at 11.42.10.png

Amazing! I spent a couple of minutes to setup everything. Thank you Idalko!

10 comments

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 16, 2020

Thanks for trying it out.
You will also find all the other Atlassian tools in our repository.  All feedback welcome.

2020-05-16_15-28-27.png

Like Christos Moysiadis likes this
Mathy Vanvoorden May 18, 2020

Hey, glad you are liking the images!

The original script you are talking about (which I also worked on) was based on Python and Ansible and had become incredibly convoluted for a fairly simple thing. I created for my own usage a very simple script that is based on Jinja2 templates and at some point we decided to also switch to this for the iDalko builds and publish the images on Docker Hub for ease of use.

If you have ideas or find bugs feel free to submit issues / pull requests here:

https://github.com/draca-be/atlassian-generator

Like # people like this
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2020

Thank you! I did use your repo a lot. I liked it. It was easy to modify it. I will have a look at the repo you provided. If I have any ideas I will definately submit an issue or pr. Thank you for making life easier! 

Daniel Ultsch May 18, 2020

Hi Alexey,

database configuration works perfectly with the standard atlassian confluence image.

When using as follows it even skips the database configuration setup screen and uses the postgresql database out of the box.

version: '3.7'
services:
confluence:
image: atlassian/confluence-server:7.3
environment:
- ATL_JDBC_URL=jdbc:postgresql://confluencedb:5432/confluence
- ATL_JDBC_USER=confluence
- ATL_JDBC_PASSWORD=secret
- ATL_DB_DRIVER=org.postgresql.Driver
- ATL_DB_TYPE=postgresql
volumes:
- ./data:/opt/atlassian/confluence/data
ports:
- 8090:8090
depends_on:
- confluencedb
restart: always

confluencedb:
image: postgres:9.6
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_USER=confluence
- POSTGRES_DB=confluence
volumes:
- ./db:/var/lib/postgresql/data
restart: always

Since Atlassian introduced their data center products the docker images are perfectly production grade as all data center instances are running on them.

If you really need custom images I would recommend using the atlassian image as base or fork their Dockerfile repository on bitbucket.org.

Like Alexey Matveev likes this
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2020

Thank you @Daniel Ultsch !

It would be nice if Atlassian added more examples to the docs.

Like Daniel Ultsch likes this
aljbali December 27, 2020

Hi, I am looking to run confluence-server backed up by external database ( PostgreSQL) on k8s  , I was wondering if it's ok to run multiple replicas per a single instance? thnx 

Mathy Vanvoorden December 27, 2020

@aljbaliif you're talking about horizontal scaling of Confluence you need Confluence Data Center:

https://confluence.atlassian.com/enterprise/confluence-data-center-612959397.html

If you are talking about multiple instances of Confluence all connecting to their own database on a single instance of PostgreSQL, that's no problem with the regular installation (as long as your PostgreSQL is properly sized of course)

aljbali December 27, 2020

@Mathy Vanvoorden  yes,  I am talking about multiple instances of Confluence all connecting to their own database on a single instance of PostgreSQL.  Thank you so much that's very helpful.

aljbali January 20, 2021

@Mathy Vanvoorden  I didn't pay close attention when you said.  `all connecting to their own database`   I'm new to confluence so excuse me for my basic questions.

if all have their own database does that mean I am running separate instances of confluence?

Mathy Vanvoorden January 21, 2021

@aljbaliyes, that would mean separate instances. If you want to horizontally scale Confluence you need Data Center.

Like aljbali likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events