Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two domains lead to same app #12

Closed
kpennell opened this issue May 20, 2014 · 15 comments
Closed

Two domains lead to same app #12

kpennell opened this issue May 20, 2014 · 15 comments

Comments

@kpennell
Copy link

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?

@kpennell
Copy link
Author

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

@kpennell
Copy link
Author

Do I make separate VHOST files for each app?

@wmluke
Copy link
Owner

wmluke commented May 21, 2014

Hi @kpennell,

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

@kpennell
Copy link
Author

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
.

@kpennell
Copy link
Author

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

@kpennell
Copy link
Author

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

@wmluke
Copy link
Owner

wmluke commented May 22, 2014

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.

@kpennell
Copy link
Author

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.

@kpennell
Copy link
Author

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

@kpennell
Copy link
Author

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

@kpennell
Copy link
Author

Am I missing something?

@kpennell
Copy link
Author

kpennell commented Jun 3, 2014

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

@Antonhansel
Copy link

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 :)

@kpennell
Copy link
Author

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)
.

@wmluke
Copy link
Owner

wmluke commented Mar 2, 2015

Closing b/c #15

@wmluke wmluke closed this as completed Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants