2

Trying to deploy an app to DigitalOcean using Dokku

Followed the instructions on:
https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-dokku-application then:
http://dokku.viewdocs.io/dokku/deployment/application-deployment

Everything looked like it was deploying: deploy rails app to DigitalOcean using dokku

=====> Application deployed:
       http://178.62.95.224:35954

But then when we attempt to navigate to the app in a browser, we cannot access the app on http://178.62.95.224:35954/
(the IP address of the DigitalOcean VM and TCP Port assigned by Dokku)

What am I doing wrong? Do I need to open the TCP port? (in this case 35954) (read that ports are open by default when ever a service listens on it... https://www.digitalocean.com/community/questions/opening-ports-on-my-server is this the case?)

Tried following the suggestion in: Rails Dokku deployments to Digitalocean receives random ports

echo "example.com" > /home/dokku/VHOST
dokku ps:rebuild ruby-rails-sample

and

dokku config:set ruby-rails-sample DOKKU_NGINX_PORT=80

but no luck! still get port

Community
  • 1
  • 1
nelsonic
  • 31,111
  • 21
  • 89
  • 120
  • try adding another port here dokku config:set ruby-rails-sample DOKKU_NGINX_PORT=3450 normally, port 80 didn't work for me neither, but another one does. and then rebuild or restart the server – xploshioOn Apr 27 '17 at 15:09
  • @xploshioOn thanks _very_ much for the tip. tried it and the dokku server just keeps defaulting to the existing port. – nelsonic Apr 28 '17 at 08:00
  • note-to-self: http://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode (this totally worked!) – nelsonic May 09 '17 at 14:43

1 Answers1

3

You probably want to turn off ufw so that the random port is exposed to the world. You can get around this by instead using subdomains for virtualhosts.

Jose Diaz-Gonzalez
  • 2,066
  • 1
  • 15
  • 19