Dokku: Expose two ports from an application

北战南征 提交于 2019-12-10 10:24:51

问题


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?


回答1:


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...



来源:https://stackoverflow.com/questions/26134996/dokku-expose-two-ports-from-an-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!