Evan Zlotnick
Evan Zlotnick

Reputation: 11

Rails Dokku deployments to Digitalocean receives random ports

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

Upvotes: 1

Views: 337

Answers (2)

frmdstryr
frmdstryr

Reputation: 21362

I had to enable VHOSTS for my app:

domains:enable <app>

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

Upvotes: 1

andrewsomething
andrewsomething

Reputation: 2246

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)

Upvotes: 1

Related Questions