steelThread / redmon

A web interface for managing redis: cli, admin, and live monitoring
http://steelthread.github.com/redmon/
1.57k stars 127 forks source link

How to run from thin? #78

Closed jmmills closed 8 years ago

jmmills commented 9 years ago

Need to be able to configure a prefix for the service so that it operates properly from behind a proxy (nginx), this is supported from thin, but not from the redmon cli script.

jmmills commented 9 years ago

The real issue here is when running from behind a proxy_pass from nginx the path to static content is wrong... for example:

location /redmon/ {
   proxy_pass http://localhost:4567; # redmon server
}

Then when you try for http://$nginx_host/redmon/ none of the JS or CSS files have the right path.

steelThread commented 9 years ago

Never put redmon behind nginx. I'll play around with it over the weekend. Thanks!

jmmills commented 9 years ago

I ended up creating my own config.ru for rack that accepts an env variable for mount point:

config.ru | uploaded via ZenHub

app.rb | uploaded via ZenHub

krsyoung commented 8 years ago

@jmmills are you still using your solution? I'm stuck in the same boat trying to figure out the right path forward. I'm making use of the redmon docker image so ideally I can get support directly into redmon itself.

I created a fork which adds a new option called --base-path to bin/redmon. If it is specified it will then mount the server at the path (i.e. redmon --base-path '/redmon' would mount the server at http://somehost/redmon). Assets will properly load.

Thoughts? @steelThread you interested in taking a pull request?

jmmills commented 8 years ago

I'm not, iirc I ended up just pointing ops to the port it was running on. I'll double check on Monday if I remember.

Thanks, Jason Mills

On Aug 19, 2016, at 10:43 AM, Christopher Young notifications@github.com wrote:

@jmmills are you still using your solution? I'm stuck in the same boat trying to figure out the right path forward. I'm making use of the redmon docker image so ideally I can get support directly into redmon itself.

I created a fork which adds a new option called --base-path to bin/redmon. If it is specified it will then mount the server at the path (i.e. redmon --base-path '/redmon' would mount the server at http://somehost/redmon). Assets will properly load.

Thoughts? @steelThread you interested in taking a pull request?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

steelThread commented 8 years ago

@krsyoung - sure!

krsyoung commented 8 years ago

Excellent, round 1 submitted: https://github.com/steelThread/redmon/pull/85

Thanks @steelThread!

krsyoung commented 8 years ago

Cool, this is merged and looking good. Thanks @steelThread, any thoughts on cutting a new version of the gem?

steelThread commented 8 years ago

Thanks for validating. I'll publish a little later today.

steelThread commented 8 years ago

Done!

steelThread commented 8 years ago

Let me know if that works for you @krsyoung

krsyoung commented 8 years ago

After a week of testing things are looking perfect. Thanks again @steelThread! 👌