gpt4 book ai didi

tomcat - OpenShift 迁移 - 如何处理 .openshift 文件夹?

转载 作者:行者123 更新时间:2023-11-28 22:16:32 24 4
gpt4 key购买 nike

由于 OpenShift 2 即将落幕,许多公司/个人正在将他们的 OpenShift v2 应用程序迁移到 OpenShift Pro

OpenShift v2 文件夹 .openshift 不再包含在 OpenShift Pro 中,RedHat 的迁移文档实际上指出它应该被删除

但是,如果您实际使用了 .openshift 公开的功能(例如 Tomcat 设置)怎么办?例如 tomcat-users.xmlserver.xml

我,我自己已经使用server.xml 来指定添加docBase

<Context docBase="${OPENSHIFT_DATA_DIR}/documents" path="/documents" />

我该怎么办?

这在 OpenShift Pro 中是如何实现的?

是不是不能再做了?

它不受欢迎吗?

现在我们是付费客户,也许 RedHat(或其他地方)的人可以启发我们...

最佳答案

document有答案(没试过):

  1. All WAR files from the deployments source repository directory are copied to /opt/webserver/webapps.

  2. All files in the configuration source repository directory are copied to /opt/webserver/conf.

If you want to use custom Tomcat configuration files, the file names should be the same as for a normal Tomcat installation. For example, context.xml and server.xml.

尝试通过 oc rhc <pod_id> 登录到 pod shell并探索 /opt/webserver/conf地区。

编辑 1 -

每次部署时,都会重建服务器并且对 server.xml 所做的更改将会丢失。因此,所有配置文件都应该是创建镜像的存储库的一部分。

如果您正在使用 maven build 并且想要像 server.xml 这样的配置文件的自定义部署,请检查 this article

sample POM given here .

编辑 2

@Lyndon 在评论中建议的另一种更简单的方法

All you need to do is create a folder called configuration under the top level git folder. Any file you put in there will get copied to: /opt/webserver/conf. It really is that simple.

关于tomcat - OpenShift 迁移 - 如何处理 .openshift 文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46447890/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com