Skip to content

Instantly share code, notes, and snippets.

@jrschumacher
Created January 16, 2015 18:03
Show Gist options
  • Save jrschumacher/58e5189942f28053a9e1 to your computer and use it in GitHub Desktop.
Save jrschumacher/58e5189942f28053a9e1 to your computer and use it in GitHub Desktop.
docker latest no port issue
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
32b9ac00b8fa dokku/coach:latest "/bin/bash -c '/star About an hour ago Up About an hour determined_bardeen
ed13cc0c60b6 dokku/helloworld:latest "/bin/bash -c '/star About an hour ago Up About an hour 0.0.0.0:49154->5000/tcp dreamy_hopper
@jrschumacher
Copy link
Author

cat /home/dokku/*/nginx.conf
upstream coach2 { server 172.17.0.57:5000; }
server {
  listen      [::]:80;
  listen      80;
  server_name coach2.xxx.pw ;
  location    / {
    proxy_pass  http://coach2;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
  include /home/dokku/coach2/nginx.conf.d/*.conf;
}
upstream coach { server 172.17.0.39:5000; }
server {
  listen      [::]:80;
  listen      80;
  server_name coach.xxx.pw coach.thebaydoor.com;
  location    / {
    proxy_pass  http://coach;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
  include /home/dokku/coach/nginx.conf.d/*.conf;
}
upstream helloworld { server 127.0.0.1:49154; }
server {
  listen      [::]:80;
  listen      80;
  server_name helloworld.xxx.pw;
  location    / {
    proxy_pass  http://helloworld;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
  include /home/dokku/helloworld/nginx.conf.d/*.conf;
}
upstream test { server 172.17.0.75:5000; }
server {
  listen      [::]:80;
  listen      80;
  server_name test.xxx.pw ;
  location    / {
    proxy_pass  http://test;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
  include /home/dokku/test/nginx.conf.d/*.conf;
}
upstream whiteboard { server 172.17.0.26:5000; }
server {
  listen      [::]:80;
  listen      80;
  server_name whiteboard.xxx.pw ;
  location    / {
    proxy_pass  http://whiteboard;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection upgrade;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Request-Start $msec;
  }
  include /home/dokku/whiteboard/nginx.conf.d/*.conf;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment