Deploy Static Content to APPUiO

This example describes how to deploy static content, like html files, images, videos, css, js to APPUiO.

Apache based image

As base image we are going to use the php:latest OpenShift base image, this image is supported and includes an Apache. In our case it is going to serve the static content.

The following two workflows are supported

Source To image Workflow from Git Repository

the simplest way to deploy static content to APPUiO is by using the source to image workflow

The source to image deployment basically scans the git repository and decides based on some rules on how to build the source code located in the respository. In our case the static content does not need to be built, therefore it simply “copies” the content to the correct location.


The source to image (S2I) workflow is very powerful, in our example we only use the basic build method. The S2I workflow can easily be extended, by running custom assemble and run scripts. Check out for further information.


Creating a new App inside a project

Note: please check the getting started guide for more information about creating an account, downloading the cli, login and on how to create a new APPUiO project.

oc new-app [builderimage]~[gitrepository]


oc new-app rhscl/php-56-rhel7~

or in case you want to use the centos based image:

oc new-app centos/php-56-centos7~

Note: use oc expose service [servicename]


You can also deploy the static content by using the webconsole.

the app build is triggered and automatically deployed.

Docker Build Workflow

The second way to deploy your static content to APPUiO is the docker build. This approach is way more flexible, therefore you have the possibility to either install additional packages inside the image and to customize the build process of your application.

Anyway, in our case we simply add the static content which is located in the app directory in our repository to the docker image:

FROM openshift/php-56-centos7
ADD app /opt/app-root/src


Creating a new app inside a project:

oc new-app [builderimage] --strategy=docker

for example:

oc new-app --strategy=docker

Nginx-based image

The deployment of your static content inside an nginx based container works similar to the Apache-based

Source To image

You can trigger the deployment with the following command:

oc new-app centos/nginx-18-centos7~

Docker Build

Just change the Base image to the centos nginx image in your Dockerfile

FROM centos/nginx-18-centos7
ADD app /opt/app-root/src

And create the app on APPUiO, which triggers a build and deployment:

oc new-app --strategy=docker

Continuous Integration: Trigger Rebuild

If you want code changes to trigger rebuilds and redeployments of your application, you can simply add webhooks. APPUiO supports generic and GitHub triggers.

Check out for further information.