Rails Dokku deployments to Digitalocean receives random ports

戏子无情 提交于 2019-12-24 14:49:24

问题


I created a rails app and have successfully deployed it to DigitalOcean. Every time I make a deployment, the port changes. First question, how do I get it to stop, and how do I get my application to respond to port 80 so I can hit it from the outside world without specifying the port number? Part of me wants to go back to heroku and just pay more because I don't get these headaches...


回答1:


Unless you configure Dokku to use your domain name, it will serve the app at a random port.

Put your root domain name in the file /home/dokku/VHOST From the Dokku docs:

If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. http://example.com:49154)




回答2:


I had to enable VHOSTS for my app:

domains:enable <app>

See http://dokku.viewdocs.io/dokku/configuration/domains/#domain-configuration



来源:https://stackoverflow.com/questions/27497928/rails-dokku-deployments-to-digitalocean-receives-random-ports

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