wmluke / dokku-domains-plugin

Dokku plugin to create nginx vhost with multiple domains

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two domains lead to same app

kpennell opened this issue · comments

commented

Hello. I'm a newbie with a problem. I truly believe I followed the dokku and domains-plugin instructions right. I think I'm just missing something on assigning to domains. Perhaps with a port.

I deployed two sample Node apps and they seem to have launched fine.

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9947b492c768 dokku/noderest:latest /bin/bash -c '/start 4 seconds ago Up 4 seconds 0.0.0.0:49154->5000/tcp sharp_ptolemy c466d368aa02 ac37d44feb0a /build/builder 30 seconds ago Exited (0) 6 seconds ago loving_mcclintock eb0753770011 progrium/buildstep:latest /bin/bash -c 'mkdir 30 seconds ago Exited (0) 30 seconds ago silly_bohr 12e3d5ee5efc dokku/nodesamp:latest /bin/bash -c '/start 3 minutes ago Up 3 minutes 0.0.0.0:49153->5000/tcp jolly_torvalds

When I go to myip:49153 or myip:49154, the apps are working there fine.

So then I followed the instructions for doing the domains:

`
root@kyledokku:~# dokku domains:set nodesamp www.ahalearning.co
-----> Creating /home/dokku/nodesamp/DOMAINS

  • Reloading nginx configuration nginx [ OK ]
    root@kyledokku:~# ssh dokku@187.180.224.50 domains:set nodesamp www.ahalearning.co
  • Reloading nginx configuration nginx
    ...done.
    root@kyledokku:~# dokku domains:set noderest www.kyleapennell.com
    -----> Creating /home/dokku/noderest/DOMAINS
  • Reloading nginx configuration nginx [ OK ]
    root@kyledokku:~# ssh dokku@187.180.224.50 domains:set noderest www.kyleapennell.com
  • Reloading nginx configuration nginx
    ...done.

`

And both those seemed to work fine.

So when I go docker ps -a , here's what I see:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9947b492c768 dokku/noderest:latest /bin/bash -c '/start 9 minutes ago Up 9 minutes 0.0.0.0:49154->5000/tcp sharp_ptolemy c466d368aa02 ac37d44feb0a /build/builder 10 minutes ago Exited (0) 10 minutes ago loving_mcclintock eb0753770011 progrium/buildstep:latest /bin/bash -c 'mkdir 10 minutes ago Exited (0) 10 minutes ago silly_bohr 12e3d5ee5efc dokku/nodesamp:latest /bin/bash -c '/start 13 minutes ago Up 13 minutes 0.0.0.0:49153->5000/tcp jolly_torvalds

When I go to either of those domains, they both go to the app that was deployed second. I'm seeing that >5000...does that mean they are both going to port 5000? Is that where I'm going wrong?

Any other ideas on where to look or what to try?

commented

Also, do my apps all need to be within /home/dokku ? for it to work?

commented

Do I make separate VHOST files for each app?

Hi @kpennell,

Yes, this plugin assumes that all dokku apps reside within /home/dokku/$APP_NAME. Were are your apps?

commented

My bad, Luke. I missed that somehow in this tut and the main dokku page.
I'll try again.

On Tue, May 20, 2014 at 7:27 PM, Luke Bunselmeyer
notifications@github.comwrote:

Hi @kpennell https://github.com/kpennell,

Yes, this plugin assumes that all dokku apps reside within
/home/dokku/$APP_NAME. Were are your apps?


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-43699836
.

commented

Hi @wmluke ,
I redid the VPS on a new droplet with the same apps. I'm still getting both pointing to one app. This is how my files look. nodesamp and noderest are each apps. They run fine when I go to myip:port for each of them. But the domains don't line up right. Anything obvious missing?

└── dokku
├── AUTHORS
├── bootstrap.sh
├── contrib
│   └── dokku-installer.rb
├── docs
│   ├── advanced-installation.md
│   └── index.md
├── dokku
├── dokku.1
├── HISTORY.md
├── LICENSE
├── Makefile
├── noderest
│   ├── app.js
│   ├── bin
│   ├── package.json
│   ├── public
│   ├── README.md
│   ├── routes
│   └── views
├── nodesamp
│   ├── app.json
│   ├── index.js
│   ├── package.json
│   ├── public
│   └── README.md
├── plugins
│   ├── 00_dokku-standard
│   ├── backup
│   ├── config
│   ├── git
│   ├── nginx-vhosts
│   └── WARNING
├── README.md
├── tests
│   ├── apps
│   ├── ci
│   ├── run_ec2
│   ├── run_vagrant
│   └── test_deploy
└── Vagrantfile

commented

Do I need to put in VHOST files manually for each of them?

Ahhh, I should have read your cmd logs more carefully...you need to set both domains in a single call...

domains:set nodesamp www.ahalearning.co www.kyleapennell.com

You were overwriting the first command with the second one.

Let me know how it goes.

commented

Perhaps I'm misunderstanding the instructions. I guess I thought it went something like this:

dokku domains:set app1 www.domain1.com

dokku domains:set app2 www.domain2.com

So should it actually be
domains:set nodesamp noderest www.ahalearning.co www.kyleapennell.com 2 domains, 2 apps at once? Or am I missing something?

I was trying to set the app called noderest to one domain. And the app nodesamp to the other domain.

Sorry if I'm misunderstanding your suggestion.

commented

I double checked the domains and they seem to be set fine. Odd. Guessing I'm misunderstanding something elementary:

root@dokkutry:~# dokku domains nodesamp
www.ahalearning.co
root@dokkutry:~# dokku domains noderest
www.vibesample.com

commented

Perhaps it's the 2nd part that is overwriting?

This is what I did

ssh dokku@domain1.com domains:set app1 www.domain1.com

ssh dokku@domain2.com domains:set app2 www.domain2.com

commented

Am I missing something?

commented

Well, thanks anyway. Seems like a great plugin. Just a bit above my abilities right now.

Hello @kpennell , since v0.3.1 Dokku has its own domain management built-in plugin.
The awesome plugin done by @wmluke actually breaks my apps since the new dokku versions.

To configure your domain with the built in plugin, read this http://progrium.viewdocs.io/dokku/nginx

Have a good day :)

commented

Thanks, Anton.

On Thu, Jan 29, 2015 at 5:52 AM, AntonHansel notifications@github.com
wrote:

Hello @kpennell https://github.com/kpennell , since v0.3.1 Dokku has
its own domain management built-in plugin.
The awesome plugin done by @wmluke https://github.com/wmluke actually
breaks my apps since the new dokku versions.

To configure your domain with the built in plugin, read this
http://progrium.viewdocs.io/dokku/nginx

Have a good day :)


Reply to this email directly or view it on GitHub
#12 (comment)
.

Closing b/c #15