{"action":"created","issue":{"url":"https://api.github.com/repos/progrium/dokku/issues/948","labels_url":"https://api.github.com/repos/progrium/dokku/issues/948/labels{/name}","comments_url":"https://api.github.com/repos/progrium/dokku/issues/948/comments","events_url":"https://api.github.com/repos/progrium/dokku/issues/948/events","html_url":"https://github.com/progrium/dokku/issues/948","id":56693821,"number":948,"title":"Port 5000 not open","user":{"login":"dallas","id":5059,"avatar_url":"https://avatars.githubusercontent.com/u/5059?v=3","gravatar_id":"","url":"https://api.github.com/users/dallas","html_url":"https://github.com/dallas","followers_url":"https://api.github.com/users/dallas/followers","following_url":"https://api.github.com/users/dallas/following{/other_user}","gists_url":"https://api.github.com/users/dallas/gists{/gist_id}","starred_url":"https://api.github.com/users/dallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dallas/subscriptions","organizations_url":"https://api.github.com/users/dallas/orgs","repos_url":"https://api.github.com/users/dallas/repos","events_url":"https://api.github.com/users/dallas/events{/privacy}","received_events_url":"https://api.github.com/users/dallas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-05T16:33:23Z","updated_at":"2015-02-11T22:40:12Z","closed_at":"2015-02-05T18:54:35Z","body":"I'm having major trouble getting a Ghost app (an Express.js app running on node) to work on my dokku (version 0.3.13-88-g2dad1af) running on a Digital Ocean droplet. I've added the config variable to set `NODE_ENV=production` and the app logs tell me:\r\n\r\n```\r\nGhost is running...\r\nYour blog is now available on http://dallasandnicole.com\r\n```\r\n\r\nIn the nginx `error.log` file I just see lines like this when I try to access the site:\r\n\r\n```\r\n2015/02/04 23:27:51 [error] 25746#0: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 24.117.148.163, server: dallasandnicole.com, request: \"GET / HTTP/1.1\", upstream: \"http://172.17.1.84:5000/\", host: \"www.dallasandnicole.com\"\r\n24.117.148.163 - - [05/Feb/2015:11:25:52 -0500] \"GET /favicon.ico HTTP/1.1\" 502 568 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36\"\r\n```\r\n\r\nI was quite frustrated and tried so many things at this point. I updated all my `apt-get` packages, I updated dokku, I rebooted my system, I repeatedly deleted and recreated the dokku app in question, I rebuilt its nginx config, I threw my hands up in the air and said a prayer.\r\n\r\nThen I ran `nmap -p1-10000 172.17.1.84` (the port we're looking for is `5000`) and got these results:\r\n\r\n```\r\nStarting Nmap 6.40 ( http://nmap.org ) at 2015-02-04 23:57 EST\r\nNmap scan report for 172.17.1.84\r\nHost is up (0.000023s latency).\r\nAll 10000 scanned ports on 172.17.1.84 are closed\r\nMAC Address: 02:42:AC:11:01:54 (Unknown)\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 3.70 seconds\r\n```\r\n\r\nWhen I ran the same thing on another node app I have successfully running using the [abhishekmunie/heroku-buildpack-static](https://github.com/abhishekmunie/heroku-buildpack-static) buildpack, I get:\r\n\r\n```\r\nStarting Nmap 6.40 ( http://nmap.org ) at 2015-02-04 23:58 EST\r\nNmap scan report for 172.17.0.185\r\nHost is up (0.000024s latency).\r\nNot shown: 9999 closed ports\r\nPORT     STATE SERVICE\r\n5000/tcp open  upnp\r\nMAC Address: 02:42:AC:11:00:B9 (Unknown)\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 3.38 seconds\r\n```\r\n\r\nSo obviously it can work, so I'm not sure where the problem lays.\r\n\r\nRunning `dokku logs` for the app gives me nothing but smiles and rainbows:\r\n\r\n```\r\n> ghost@0.5.8 start /app\r\n> node index\r\n\r\nMigrations: Database initialisation required for version 003\r\nMigrations: Creating tables...\r\nMigrations: Creating table: posts\r\nMigrations: Creating table: users\r\nMigrations: Creating table: roles\r\nMigrations: Creating table: roles_users\r\nMigrations: Creating table: permissions\r\nMigrations: Creating table: permissions_users\r\nMigrations: Creating table: permissions_roles\r\nMigrations: Creating table: permissions_apps\r\nMigrations: Creating table: settings\r\nMigrations: Creating table: tags\r\nMigrations: Creating table: posts_tags\r\nMigrations: Creating table: apps\r\nMigrations: Creating table: app_settings\r\nMigrations: Creating table: app_fields\r\nMigrations: Creating table: clients\r\nMigrations: Creating table: accesstokens\r\nMigrations: Creating table: refreshtokens\r\nMigrations: Populating fixtures\r\nMigrations: Populating permissions\r\nMigrations: Creating owner\r\nMigrations: Populating default settings\r\nMigrations: Complete\r\nGhost is running...\r\nYour blog is now available on http://dallasandnicole.com\r\nCtrl+C to shut down\r\n```\r\nWhich is the same output that I get if I run `docker logs` with the container ID stored in `/home/dokku/dallasandnicole.com/CONTAINER`.\r\n\r\nAnd I'm sure that inside that box it is available at the Ghost default port (`2368`). Do I need to configure that port to point to something else? `80` for example? Can it not open up port `5000` on the Docker box if there's not actually anything running on whatever expected port inside the box?\r\n\r\nI'm such a noob. Please forgive me for my ignorance. But I'm also rather frustrated and confused. Any help would be greatly appreciated. Thanks!"},"comment":{"url":"https://api.github.com/repos/progrium/dokku/issues/comments/73980685","html_url":"https://github.com/progrium/dokku/issues/948#issuecomment-73980685","issue_url":"https://api.github.com/repos/progrium/dokku/issues/948","id":73980685,"user":{"login":"dallas","id":5059,"avatar_url":"https://avatars.githubusercontent.com/u/5059?v=3","gravatar_id":"","url":"https://api.github.com/users/dallas","html_url":"https://github.com/dallas","followers_url":"https://api.github.com/users/dallas/followers","following_url":"https://api.github.com/users/dallas/following{/other_user}","gists_url":"https://api.github.com/users/dallas/gists{/gist_id}","starred_url":"https://api.github.com/users/dallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dallas/subscriptions","organizations_url":"https://api.github.com/users/dallas/orgs","repos_url":"https://api.github.com/users/dallas/repos","events_url":"https://api.github.com/users/dallas/events{/privacy}","received_events_url":"https://api.github.com/users/dallas/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T22:40:12Z","updated_at":"2015-02-11T22:40:12Z","body":"I think the preferred way to handle it is with a file named `Procfile` in the root of your rails app. In it you simply put the name of the process, `web` in this case, a colon `:`, and then the command to run to get the web server going:\r\n\r\n    web: bundle exec rails server -p 5000"}}