Deploy Redmine Project Management App with Docker

Jack Wallen walks you through the process of deploying the project management tool Redmine using Docker Compose.

A developer reviews code on two monitors.
Image: Andrey Popov? Adobe Stock

Redmine is an open-source project management platform that you can install on your local LAN or on a third-party cloud host. This style of project management includes support for multiple projects, flexible role-based access control, flexible issue tracking, Gantt charts, calendars, messages, documents and file management, feeds and email notifications, wikis per project, and forums per project.

SEE: Hire Kit: Project Manager (TechRepublic Premium)

Redmine is free to use and can be installed manually or via Docker. As manual installation can be a bit cumbersome for some, the more logical and portable method is to deploy the platform via Docker. And that’s exactly what I want to show you.

What you need to deploy Redmine with Docker Compose

For this to work, you need an operating system that supports Docker. I will be demonstrating with Ubuntu Server 22.04, but you can work with any operating system that supports the container runtime in question.

Get ready with the operating system of your choice.

How to install the latest version of Docker

In case your operating system doesn’t already include Docker, we’ll install it.

First, let’s add the official Docker gpg key with:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Next, add the Docker repository:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install the required dependencies with the command:
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y
Update app:

sudo apt-get update

Install the latest version of the Docker engine with the command:

sudo apt-get install docker-ce docker-ce-cli containerd.io -y

Finally, make sure your user is still a member of the docker group with the command:

sudo usermod -aG docker $USER

Log out and back in for the changes to take effect.

You should now be able to use both the docker and docker-compose commands.

How to build the Dockerfile

Next, we need to create a Dockerfile that defines the version of Redmine we’re going to use. We will use the latest one which is 5.0.3. Create a new directory with the command:

mkdir ~/redmine

Change to this directory with:

cd ~/redmine

Build the Dockerfile with:

nano Dockerfile

In this file, paste the following:

FROM redmine:5.0.3

RUN apt-get update

Save and close the file.

How to create the docker-compose.yml file

We now create the docker-compose.yml file with the command:

nano docker-compose.yml

version: '3.3'

services:

   postgres:

     image: postgres:10

     volumes:

       - ./storage/postgresql-data:/var/lib/postgresql/data

     environment:

       POSTGRES_PASSWORD: "PASSWORD"

       POSTGRES_DB: "redmine"

       PGDATA: "/var/lib/postgresql/data"

     restart: always

   redmine:

     build:

       context: .

     image: redmine:custom

     ports:

       - 80:3000

     volumes:

       - ./storage/docker_redmine-plugins:/usr/src/redmine/plugins

       - ./storage/docker_redmine-themes:/usr/src/redmine/public/themes

       - ./storage/docker_redmine-data:/usr/src/redmine/files

     environment:

       REDMINE_DB_POSTGRES: "postgres"

       REDMINE_DB_USERNAME: "postgres"

       REDMINE_DB_PASSWORD: "PASSWORD"

       REDMINE_DB_DATABASE: "redmine"

       REDMINE_SECRET_KEY_BASE: "…"

     restart: always

Be sure to change PASSWORD to a strong and unique password.

Save and close the file. The Docker-Compose file above configures everything necessary and even sets up volumes for persistent data.

How to deploy the container

We can now deploy the container with the command:

docker-compose up -d

How to access Redmine

After the images are pulled and the container is deployed, give it a minute to settle down, and then point your web browser to http://SERVER, where SERVER is the IP address of the hosting server.

You should see Redmine’s login page where you use the admin/admin credentials. After successful login, you will be prompted to change the admin user password immediately (Figure A).

Figure A

The prompt to change the Redmine admin password.
The prompt to change the Redmine admin password.

After resetting the admin password, you will be presented with a window where you can adjust your account settings (Figure B).

Figure B

Customize a user account in Redmine.
Customize a user account in Redmine.

After you’ve taken care of that, click on Administration in the top menu bar. In the resulting window (Figure C), make sure you go through all administrative tasks such as B. creating users/groups/roles, configuring the workflow, maintaining general settings, etc.

Figure C

Redmine admin panel
In the Redmine admin panel you take care of the rest of the settings.

And here we go. Redmine is up and running and ready to help you manage these projects like a boss.

Leave a Reply

Your email address will not be published. Required fields are marked *