girlandhercode / docker-confluence

Dockerized Atlassian Confluence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-confluence

Dockerized Atlassian Confluence

Contents

About

This repo uses Docker and Docker Compose to automate the deployment of Atlassian Confluence.

This is more than just a Confluence image. Included in this repo is everything you need to get Confluence up and running as quickly as possible and a pre-configured backup and restoration solution that is compliant with Atlassian's production backup recommendations.

Atlassian's Confluence image on the Docker Hub uses OpenJDK, which is not a supported platform. The Confluence image in this repo uses Oracle's JRE, which is a supported platform.

How-to guides

Note: some of the commands in these guides may require root access to your system. If that is the case, either run the commands while logged in to the root account, or simulate a login to the root account using sudo -i. Due to the way environment variables are passed on some systems, typing sudo before each command is not a supported method of running the commands in these guides with root access.

Installing

  1. Ensure the following are installed on your system:

  2. Clone this repo to a location on your system. Note: in all of the guides on this page, it is assumed the repo is cloned to /srv/docker/confluence.

    git clone https://github.com/ianharrier/docker-confluence.git /srv/docker/confluence
  3. Set the working directory to the root of the repo.

    cd /srv/docker/confluence
  4. Create the .env file using .env.template as a template.

    cp .env.template .env
  5. Using a text editor, read the comments in the .env file, and make modifications to suit your environment.

    vi .env
  6. Start Confluence in the background.

    docker-compose up -d
  7. In a web browser, start the Confluence setup process by navigating to http://<Docker-host-IP>:8090 (or whatever port you specified in the .env file).

  8. Choose to setup Confluence using a PostgreSQL database, and use db as the database hostname. For example, the Database URL should look something like jdbc:postgresql://db:5432/confluence. If you changed the database name in the .env file, be sure to change it here too.

  9. After the initial Confluence setup is complete, disable the Back Up Confluence job at http://<Docker-host-IP>:8090/admin/scheduledjobs/viewscheduledjobs.action to avoid creating unnecessary backups. Note that if you do not disable the Back Up Confluence job and the backup solution in this repo is enabled, the backup solution will automatically delete all XML backups created by Confluence.

Upgrading

Warning: the upgrade process will immediately stop and upgrade the current production environment. The application stack will be unavailable while it is being upgraded.

  1. Set the working directory to the root of the repo.

    cd /srv/docker/confluence
  2. Run the upgrade script.

    ./scripts/app-upgrade.sh

Running a one-time manual backup

  1. Set the working directory to the root of the repo.

    cd /srv/docker/confluence
  2. Run the backup script.

    docker-compose exec cron app-backup

Restoring from a backup

Warning: the restoration process will immediately stop and delete the current production environment. You will not be asked to save any data before the restoration process starts.

  1. Set the working directory to the root of the repo.

    cd /srv/docker/confluence
  2. List the available files in the backups directory.

    ls -l backups
  3. Specify a file to restore in the following format:

    ./scripts/app-restore.sh <backup-file-name>

    For example:

    ./scripts/app-restore.sh 20170501T031500+0000.tar.gz

Uninstalling

  1. Set the working directory to the root of the repo.

    cd /srv/docker/confluence
  2. Remove the application stack.

    docker-compose down
  3. Delete the repo. Warning: this step is optional. If you delete the repo, all of your Confluence data, including backups, will be lost.

    rm -rf /srv/docker/confluence

About

Dockerized Atlassian Confluence

License:MIT License


Languages

Language:Shell 66.1%Language:Dockerfile 33.9%