How to deploy on OpenShift

This tutorial refers to a version of (1.x) which is now EOL. Please help us updating it!

Your OpenShift instance

To get started, just locally install minishift from the OpenShift community edition - it’s great for testing! (You may want to slightly increase resources from the default via minishift config set memory 4096; minishift config set cpus 4.)

Alternatively, use the Container Development Kit (CDK) from Red Hat or Get Started and Create a FREE ;-) Account on Online, or use an OpenShift Partner’s cloud.

Obtain the OC CLI

Whatever your OpenShift cluster is, it’s easiest to use the oc CLI Client tool to deploy; it’s available e.g. on

Deploy on OpenShift using OC

Once you have oc locally available, and you have obtained an OpenShift Login Token from the Copy Login Command on the menu in the upper right corner under your name in the OpenShift Console’s UI, you only have to do the following simple steps to deploy

oc login https://... --token=...

oc new-project alf-io

oc apply -f

oc start-build alfio

oc logs -f bc/alfio

When this Build (bc) is finished, the Deployment (dc) of a Pod with the Container will automatically start. You’ll then need to check its log to find the generated admin credentials and get the URL via oc status. When using Minishift it will be so you’ll open

oc logs dc/alfio

oc status

NB: This uses OpenShift’s PostgreSQL (from here), but does NOT use the container images from DockerHub. Instead it builds a container from source using OpenShift’s S2I Java Builder feature, thanks to this project’s configuration in .s2i/. Check out this blog post (which is also here) to learn more about how to use S2I with Java 11 & Gradle on OpenShift.

HTTPS Security

To use TLS on a Route with a custom Hostname, use openshift-acme which will automagically add a Cert from Let’s Encrypt as soon as you add the metadata: annotations: "true" to your Route.

Postgres database alternative

Instead of the containerized Postgres which the YAML (above) sets up on your OpenShift, you could also consider using an external managed Postgres as a Service, e.g. from (You’ll want to deploy your ElephantSQL instance as close as possible to your OpenShift cluster in order to reduce latency.)


this tutorial has been written by vorburger