pagerduty_dashing icon indicating copy to clipboard operation
pagerduty_dashing copied to clipboard

pagerduty with no heroku/rails?

Open tweedyjm opened this issue 9 years ago • 4 comments

Looking at the code, I am thinking that pagerduty_dashing won't work with regular sinatra Dashing. My team doesn't have or use Heroku, and of the widgets we've deployed, are for sinatra.

tweedyjm avatar Jan 22 '16 21:01 tweedyjm

Prior to converting this over to run on Heroku, I ran this on a server for over a year so it is doable. Lemme look T this again, it's been a while. :)

thegreenrobot avatar Jan 22 '16 23:01 thegreenrobot

I certainly appreciate it. I’ve been trying to work out how we were going to setup a heroku server and setup a dashing-rails in addition to a sinatra server, and on and on and on. This would be great help.

-Jeremy Tweedy

On Jan 22, 2016, at 5:36 PM, Matthew Green <[email protected]mailto:[email protected]> wrote:

Prior to converting this over to run on Heroku, I ran this on a server for over a year so it is doable. Lemme look T this again, it's been a while. :)

— Reply to this email directly or view it on GitHubhttps://github.com/thegreenrobot/pagerduty_dashing/issues/25#issuecomment-174087843.

tweedyjm avatar Jan 25 '16 19:01 tweedyjm

Have you had any success in finding the local server code? I'd like to be able to run this directly from regular sinatra dashing. Thanks!

cjwallgren avatar Apr 07 '16 20:04 cjwallgren

Hi there, thanks for reaching out.

So this works out of the box with no additional magic. To get pagerduty_dashing running locally you just need to set the PagerDuty environment variables.

$ cat environment.sh
#!/bin/bash

export PAGERDUTY_URL='https://yourname.pagerduty.com'
export PAGERDUTY_APIKEY='insert_api_key_here'
export PAGERDUTY_SERVICES='{"services": { "staging": "ZZZZZZ","preprod": "BBBBBB","production": "PPPPPP"}}'
export PAGERDUTY_SCHEDULES='{"schedules": { "oncall": "CCCCCC","firefighter": "EEEEEE"}}'


$ source environment.sh
$ dashing start
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop
127.0.0.1 - - [09/Apr/2016 15:00:57] "GET /pagerduty HTTP/1.1" 200 3043 0.0026
127.0.0.1 - - [09/Apr/2016 15:00:57] "GET /events HTTP/1.1" 200 - 1.6717
127.0.0.1 - - [09/Apr/2016 15:00:59] "GET /views/text.html HTTP/1.1" 200 175 0.0007
127.0.0.1 - - [09/Apr/2016 15:00:59] "GET /views/hotness.html HTTP/1.1" 200 192 0.0006

( if dashing start doesn't work, alternatively you could use rackup -p 3030 -s webrick )

Open a new tab in your browser and navigate to http://localhost:3030

thegreenrobot avatar Apr 09 '16 19:04 thegreenrobot