Dokku:从应用程序公开两个端口 [英] Dokku: Expose two ports from an application

查看:76
本文介绍了Dokku:从应用程序公开两个端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将基于Scala的应用程序部署到dokku,该应用程序运行http服务器和自定义的sshd服务器.

我遇到的问题是dokku似乎仅支持该应用程序的一个端口. 我需要dokku才能将我的两个应用程序端口都公开到网络上.

在docker中这是可行的,而且很直接,但是当我在dokku文件中实现相同的技术时,我得到了一个错误.

关于允许访问两个端口的任何建议?

解决方案

因为毕竟这是docker,所以您可以使用 大使 ...

您将需要如下一行:

docker run -t -i -link mysql:mysql -name mysql_ambassador -p 3306:3306 ctlc/ambassador

使用您的容器名称(来自docker images)替换端口和mysql

请参见 https://www .ctl.io/developers/blog/post/deploying-multi-server-docker-apps-with-大使

注意:请先确认您docker pull svendowideit/ambassador:latest ...

I am trying to deploy a Scala based application to dokku, the application runs a http server and a customised sshd server.

The problem I have is it seems that dokku only supports one port for the application. I need dokku to expose both my applications ports to the web.

In docker this is possible and quite straight forward to do, but when I implement the same technique in the dokku file, I get an error.

Any suggestions on allowing two ports to be accessible?

解决方案

Since this is, after all, docker, you can use an ambassador...

You will need a line like:

docker run -t -i -link mysql:mysql -name mysql_ambassador -p 3306:3306 ctlc/ambassador

Replacing with your port and mysql with your container name (from docker images)

See https://www.ctl.io/developers/blog/post/deploying-multi-server-docker-apps-with-ambassadors

NOTE: Make sure you docker pull svendowideit/ambassador:latest before...

这篇关于Dokku:从应用程序公开两个端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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