-->

Rails Dokku deployments to Digitalocean receives r

2019-08-06 09:32发布

问题:

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