Creating internal website using pow

Just downloaded and installed pow and man is it easy. Two minutes and I have a static page being displayed without even having a web application written… awesome! if you’re interested in learning more.

So why would a static page do me any good on a website? Well, I’ve written a little utility tool that checks the status of our testing environments (two different brands, 3 production branches, total of 30 different environments, each with their own suite of services and successes / failures). My utility works fine as long as you have ruby and command line access; unfortunately that isn’t the case for our windows users so I want to make this available to them via an internal website… hence pow. For starters, I plan to use chron to save the output from the utility every 5 minutes or so and then just publish the raw output. Fancy formatting and access to the CLI parameters can come later.

Finally, my question: How do I go about publishing the website so that others can reach it? It’s some kind of (probably simple) networking magic that I can’t quite figure out – any suggestions? I’ve tried from another machine and it doesn’t find it.

Thanks…jon

Basecamp/37signals runs xip.io, which can be used pretty easily with pow. If your personal page is being served at http://mypage.dev, and your IP address is 192.168.1.40 and you want to share it in your office, you would send your coworkers this url: http://mypage.192.168.1.40.xip.io, and if your coworkers have access to your machine by IP address (meaning there’s not some NAT going on in between), they will have access to your page.

Since you are probably on dynamic IP and the tool might be useful even when you’re not hooked up to the network, this kind of page sounds like the sort of thing that you might want to run on an external server so that it’s always available and you don’t have to update the address folks use to get it.

By external, I just mean “not your laptop”, rather than “outside your office network”.

Perfect, @geoffharcourt - just what the doctor ordered. thanks!

Another great tunneling tool that I use and recommend with regularity is ngrok. It works for any site or app you’re running on localhost.

I find it most useful for sharing the app I’m working on with teammates in a chat room who are located elsewhere. I can get their feedback at the product level as early as I have something worth getting feedback on, ideally before code review and definitely before deploying to any staging or feature branch environments.

I’m not sure I understand your use case, though, @JESii. Why not deploy your static app somewhere like Heroku or Firebase so your teammates can check the site when your laptop is not connected to a network?

Thanks, @croaky; I’ll look into ngrok.

Normally I would throw up a quick Heroku app, but the company I’m consulting to is VERY security conscious so I wanted to keep it all internal to their network. Also, I am querying internal environments and services and providing information and status on their condition (updating the webi page every 10 minutes) and that’s easier to do from an internal machine. Now I’ve got a little MacMini running all the time so folks can check out which environments are up, how they’re configured, and what services are up/down.

@JESii could you maybe get an instance of Dokku (GitHub - dokku/dokku: A docker-powered PaaS that helps you build and manage the lifecycle of applications) running on the internal network only? I’ve never tried this myself, but it seems a good way to replicate Heroku for an org…

I’d definitely like to give ngrok or Dokku a try;

I found that pow was quite unreliable. First, I saw that if I was writing to the directory it was serving - such as updating the environment information - it just returned a “server not found” error. Since querying the services took a bit of time, that meant that folks couldn’t get access to the information for 2-3 minutes each cycle. So I created the output in a different directory, then copied it over the the public folder and that was much better.

However, it still went flaky from time to time so finally I just replaced it with the basic python webserver, gave it port # 8081,and now folks can get to it with a simple http://[IP address]:8081 and it’s very reliable. Not elegant, but it works. Thanks for all the good ideas.