I'm trying to run an app using Dokku without using VHOST, using only an IP address, to run on port 80
Asked
Active
Viewed 1,879 times
2
-
What problem are you having, and what have you tried so far? – beresfordt Feb 26 '15 at 00:15
-
I've created a virtual machine ubuntu 14.10, the I've allowed incoming HTTP tcp connection at port 80. Then I've installed dokku following the installation instructions of the site After that I've use the command git push dokku master to send my web app to the dokku The web app is working because I've checked the logs, however it's not running on port 80 – Sibelius Seraphini Feb 26 '15 at 14:34
2 Answers
0
I fixed my problem putting a nginx.conf inside my dokku app
upstream flask-domains { server 127.0.0.1:PORT; }
server {
listen [::]:80;
listen 80;
server_name external_ip;
location / {
proxy_pass http://flask-domains;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
You should change the PORT with the PORT inside the PORT file in your dokku app, and external_ip with the IP that you are using

Sibelius Seraphini
- 5,303
- 9
- 34
- 55
-1
if I am not mistaken, If you'd like to rua an app using Dokku, you need to either use the vhost method - which mounts it on your.domain.tld:80 - or you need to hit the port directly.

Leandro Papasidero
- 3,728
- 1
- 18
- 33
-
-
using dokku-bind-ports plugin to bind the app directly to port 80. https://github.com/stuartpb/dokku-bind-port – Leandro Papasidero Feb 26 '15 at 14:56
-
I've tried to use it but I don't know what to put at CONTAINER_PORT. I've used the port of the deployed app but didn't worked out. – Sibelius Seraphini Feb 26 '15 at 15:19
-
did you run `docker ps -a`? under the COMMAND column you should see sometnig like `0.0.0.0:49173->5000/tcp` then you should run `dokku bind:create app 5000 49173` This is an example from readme.md. Yours might have different values – Leandro Papasidero Feb 26 '15 at 15:28
-
my docker ps -a return nothing like this 0.0.0.0:49173->5000/tcp, just something like this: "/start web" or "/bin/bash -c 'mkdir – Sibelius Seraphini Feb 26 '15 at 18:18