Can't get the Docker install to work

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:20:13 +0000.
Sender:Fabien Herfray.
Date:Saturday, 15 August 2015 02:25:36 UTC+1.

Hi,

Here is the situation: if I understand well the bash script initializing the docker architecture, there is an Nginx standing (on 8888) in front of the dashboard (3000) and the gateway (8080).
One user is created under the organisation “testorg”.

Ok so I mapped the domains “testorg.tyk.docker” and “api1.testorg.tyk.docker” to my boot2docker vm IP.
As I understand it, when I go to “testorg.tyk.docker:8888/portal” and “testorg.tyk.docker:3000”, the infos I see are scoped for the organisation present in the URL.

First question, why do I must bypass the Nginx (port 3000) to log into the dashboard ? Why some parts of Tyk are hidden behind Nginx and not others ?

Now, as the doc says, I log into the dashboard and I create an API, set the target URL at “http://httpbin.org”, activate it, set the slug at “api1” and the listen_path at “api1” too.
I also set the catalogue and the policies. The portal at “testorg.tyk.docker:8888/portal” works fine.

As I understand it, there should be now two ways of accessing the apis. Using the raw gateway on “testorg.tyk.docker:8080/api1/” (thanks to the listen_path set at api1) or using Nginx and the host manager on “api1.testorg.tyk.docker:8888” (thanks to the slug set at api1).

Neither one nor the other work. I get a “connection refused” in the first case and a Nginx bad gateway in the second.

I must miss something important here but it is driving me crazy.

Thanks,

Fabien

Imported Google Group message.
Sender:Martin Buhr.
Date:Sunday, 16 August 2015 16:32:53 UTC+1.

Hi,

Answers inline:

Here is the situation: if I understand well the bash script initializing the docker architecture, there is an Nginx standing (on 8888) in front of the dashboard (3000) and the gateway (8080)

  • this is correct

First question, why do I must bypass the Nginx (port 3000) to log into the dashboard ? Why some parts of Tyk are hidden behind Nginx and not others ?

You can set it up any way you like, this is a QuickStart shell script, we expose the dashboard directly because it’s easier (and also the dashboard does not need any complex rewrites, but you can put this behind nginx too if you like with a simple change to the nginx templates)

As I understand it, there should be now two ways of accessing the apis. Using the raw gateway on “testorg.tyk.docker:8080/api1/” (thanks to the listen_path set at api1) or using Nginx and the host manager on “api1.testorg.tyk.docker:8888” (thanks to the slug set at api1).

Did you set the listen path to ‘/api1/’ (The slashes are important)

Neither one nor the other work. I get a “connection refused” in the first case and a Nginx bad gateway in the second.

You won’t have direct access to the gateway as I don’t think the ports in the docker are exposed, hence the connection is refused. If your listen path was set wrongly (missing slashes) then it will be nginx proxying badly too.

Let me know if that helps your situation :slight_smile:

Cheers,
Martin