I want to access a data directory in OpenShift.
I created a folder called uploads
and I also created the symlink using putty,
still I cant access the file and it shows a 404 page.
Can anybody tell me the process in detail (step by step), as I recently started working with OpenShift.
Also, whenever I update the repository using a git client it deletes the symlink. I'm working on a maven project.
Here are the steps which I followed:
cd <openshift deploy dir in my local system>
touch .openshift/action_hooks/deploy
vi .openshift/action_hooks/deploy
ln -sf ${OPENSHIFT_DATA_DIR}images /var/lib/openshift/<app-id>/jbossews/webapps
in the file. Note: images dir is already present in the data dir on the openshift server.chmod +x .openshift/action_hooks/deploy
git add .openshift/action_hooks/deploy
git commit -a -m "added deploy"
git push origin
I was able to access the images folder here: https://app-url/images
Hope this helps
Create the symlink in a deploy action hook to prevent the symlink from being overwritten.
In
.openshift/action_hooks/deploy
:See line 67 of the WordPress QuickStart as an example.