Openshift: where to put resource files that I want outside of the deployment folder

StackOverflow https://stackoverflow.com/questions/22959941

  •  30-06-2023
  •  | 
  •  

문제

I'm starting a new web app with Openshift (jboss, mysql). It's the first time I use openshift and after reading through some doc and experimenting a bit with it, I'm having one question regarding best practices for the architecture of my app.

There will be some files generated by- or uploaded to the application (resources). I'd like those files to be outside the deployment folder so they are not erased/overwritten when the app deploys again. I have browsed through the directories and I was wondering:

is it ok to use the /var/lib/openshift/[openshift-id]/app-root/data folder for these files?

도움이 되었습니까?

해결책

Yes, you should use your ~/app-root/data folder for any files that you want to not be erased when you do a git push, there is also an environment variable that you can use that points to that folder called OPENSHIFT_DATA_DIR. Please note that if you are using a scaled application, that folder is not shared among your gears.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top