I'm trying to having container A package the application and container B (like Nginx) serve the packaged application.
I am on:
So I cannot use init containers, like:
I've tried using a container in the deployment process to package the application onto a persistent volume claim. The packaged application saves onto the persistent volume claim successfully, but the deployment/pod continuously restarts the container. I tried using the pre hook to force a fail, but could not.
So I'm trying to see if I can mount a persistent volume claim on to a build config. So the build will save the packaged application on to the persistent volume claim.
I have not been able to find an example of a buildconfig template that has an attached persistent volume. Is this even possible?
Thank you for any help you can provide.
PS: Container A contains nodeJS with an Ember application. I want to use it to build the static files for Nginx (container B) to serve. So because container A isn't running a server, it always ends, but OpenShift thinks it is crashing.
In case it helps others, I ended up just deploying a pseudo init container by running my task and then starting a basic server that listens on a port that nobody uses. The task saves the files to the persistent volume that is then used by another container. The deployment succeeds because the fake server is running and not crashing and deployments have access to volume mounts, which builds don't.