How to quickly deploy the OpenProject platform as a Docker container

Jack Wallen shows you how to effortlessly deploy the powerful project management platform, OpenProject, as a Docker container.

Image: iStock / Kerkez

Open project is an exceptional platform for project management. With OpenProject, you can manage meetings, control project budgets, run reports on your projects, communicate with a project team, plan your projects from top to bottom, create forms for a project, work with agile boards, customize the theme and workflow and manage almost every aspect of your project through a beautiful web interface.

If you’ve ever tried installing software, you know how problematic it can be. Although I have successfully deployed the tool manually, the installation is about as flaky as it gets. You could nail it once, but next time (using the same process) it might fail.

Fortunately, there is a much easier and more reliable way to get OpenProject to work. Said method is by means of a Docker container. Using this route, I have never had a deployment failure on me. I’ll show you how to do just that.

SEE: 5 Linux Server Distributions You Should Be Using (TechRepublic Premium)

What you will need

I’ll demonstrate this deployment on Ubuntu Server 20.04, but you can deploy OpenProject on any platform that supports Docker and Docker Compose. You will also need a user with sudo privileges.

How to install Docker and Docker-Compose

The first thing to do is to install Docker and Docker-Compose. Connect to your Ubuntu server and install Docker with the command:

sudo apt-get install -y

Once the installation is complete, add your user to the Docker group with the command:

sudo usermod -aG docker $USER

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

To install Docker Compose, run the following two commands:

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

When you’re done installing Docker Compose, you’re ready to deploy. I’ll show you two different methods of deploying OpenProject:

  1. docker-compose: A preconfigured deployment
  2. docker: Allows you to create volumes for persistent data, if the container needs to be restarted

How to deploy OpenProject with Docker Compose

This method will use docker-compose and is the easiest method of deploying OpenProject. From the terminal window, clone the OpenProject source with the command:

git clone --depth=1 --branch=stable/11 openproject

Go to the directory containing the docker-compose.yaml file with the command:

cd openproject/compose

Make sure to update your Docker images with the command:

docker-compose pull

Once the extraction is complete, deploy the necessary containers for OpenProject with the command:

docker-compose up -d

You should now wait a few minutes (up to five), until everything is up and running and ready. Open a web browser and point it to http: // SERVER: 8080 (where SERVER is the IP address of the server hosting Docker). You should see the main OpenProject page (Figure A), where you can log in with the default credentials of admin / admin.

Figure A


The main OpenProject page is ready for you to get to work.

How to deploy with docker

Now that you know how easy it can be to deploy OpenProject, let’s make it just as easy, but give yourself the option of creating directories on the host system, which will house all of the OpenProject data. This is the recommended method for deploying OpenProject through containers, as your data will remain persistent.

To deploy in this way, you must first create the directories to host the data. Create these directories with the command:

sudo mkdir -p /var/lib/openproject/{pgdata,assets}

With your directories ready, let’s create a random string, to use as the SECRET_KEY_BASE variable. This can be done with the command:

head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo ''

Copy the output of this command.

You can then deploy the OpenProject containers with the command:

docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret -v /var/lib/openproject/pgdata:/var/openproject/pgdata -v /var/lib/openproject/assets:/var/openproject/assets openproject/community:11

Where “secret” is the random key generated by the lead order.

Again, you will have to wait a few minutes for the site to show up. I highly recommend that you deploy OpenProject with this second method, as it ensures that you can stop and start the container, without losing your data.

Take advantage of the power of OpenProject, deployed quickly and effortlessly through Docker.

Subscribe to TechRepublic How to Make Technology Work on YouTube for all the latest technical advice for professionals from Jack Wallen.

Also look

About Jon Moses

Check Also

IBM launches fourth-generation LinuxONE servers

IBM has unveiled the next generation of its LinuxONE server, which uses the Telum processor …

Leave a Reply

Your email address will not be published.