Openshift Apache HTTP Server without Git-Repo

1.5k views Asked by At

I am about to create a "Test-Dashboard" for our automatic tests. The test result of one day consists of multiple static html files. These files will be updated daily and the old files will be moved in a folder named with the current date. The files are stored on a persistent Storage inside my Openshift-Project.

Now I want to mount this storage into an running Apache HTTP Server Pod to make the results accessible but I just find solutions where the files are inside a Git-Repo. Is there a possibility to create a solution which won't depend on having the files in a Git-Repo?

2

There are 2 answers

0
raphael_mav On BEST ANSWER

Just deploy an Apache HTTP Server, Nginx or Node Docker image on your Openshift-Project. There's just no template for this UseCase and therefore you won't find any working solution in your Openshift-Catalog.

1
Will Gordon On

Here's my recommendation:

Deploy the default Apache app with the example git repo (https://github.com/openshift/httpd-ex.git).

oc new-app httpd-example

This gives you an Apache deployment. Now add your persistent volume to the deployment. Then set the environment variable DOCUMENTROOT to the full path of your persistent volume

oc env dc httpd-example DOCUMENTROOT=<path>

This should trigger a redeployment and configure Apache to server all files directly from your persistent volume.