我尝试在Jelastic环境中安装hasura docker image for centos。为此,我编写了以下清单(因为在环境设置对话框中无法选择标签v2.0.9.centos
(标签太多)):
type: install
name: hasura
nodes:
- displayName: hasura
count: 1
cloudlets: 32
nodeGroup: cp
nodeType: docker
image: hasura/graphql-engine:v2.0.9.centos
然后,因为我现在只是在玩,所以我在那个hasura节点上打开了一个控制台,并调用
graphql-engine serve --database-url postgres://hasura_user:5W87vcvNVppTbv5AAjM4@node93849-my-env.hidora.com:5432/hasura
现在,我真的很想访问我的hasura示例。问题是,这个hasura映像基于CentOS 8,Jelastic documentation表明端口自动重定向在CentOS 8上不起作用。
Hasura服务于localhost:8080。我必须在centos节点中做什么才能将端口8080暴露给外部?
这个问题并不是hasura特有的,部署在CentOS上的软件可以是任何端口上的任何软件。
1条答案
按热度按时间zpjtge221#
在Centos8节点中运行以下命令后,我能够解决我的问题:
其中
8080
是hasura正在服务的端口。