使用URL访问数据目录 [英] Access Data Directory in Openshift with URL

查看:140
本文介绍了使用URL访问数据目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在OpenShift中访问数据目录。
我创建了一个名为 uploads 的文件夹,我也使用putty创建了符号链接,
仍然无法访问该文件,并显示404页面。 / p>

任何人都可以告诉我详细的过程(一步一步),
,因为我最近开始使用OpenShift。



此外,每当我使用git客户端更新存储库时,它会删除符号链接。
我正在处理一个maven项目。

解决方案

以下是我遵循的步骤:


  1. cd< opensshift在我的本地系统中部署目录>

  2. touch .openshift / action_hooks / deploy

  3. vi .openshift / action_hooks / deploy

  4. 粘贴以下代码 ln -sf $ {OPENSHIFT_DATA_DIR} images / var / lib / openshift /< app-id> / jbossews / webapps 在文件中。注意:图像目录已经存在于openshift服务器上的数据目录中。

  5. chmod + x .openshift / action_hooks / deploy / li>
  6. git add .openshift / action_hooks / deploy

  7. git commit -a -m添加部署

  8. git push origin

我可以在这里访问图片文件夹: https:// app-url / images



希望这有助于


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:

  1. cd <openshift deploy dir in my local system>
  2. touch .openshift/action_hooks/deploy
  3. vi .openshift/action_hooks/deploy
  4. Pasted the following code 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.
  5. chmod +x .openshift/action_hooks/deploy
  6. git add .openshift/action_hooks/deploy
  7. git commit -a -m "added deploy"
  8. git push origin

I was able to access the images folder here: https://app-url/images

Hope this helps

这篇关于使用URL访问数据目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆