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

pagerduty with no heroku/rails? #25

Open
tweedyjm opened this issue Jan 22, 2016 · 4 comments
Open

pagerduty with no heroku/rails? #25

tweedyjm opened this issue Jan 22, 2016 · 4 comments

Comments

@tweedyjm
Copy link

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.

@thegreenrobot
Copy link
Owner

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

@tweedyjm
Copy link
Author

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 <notifications@github.commailto:notifications@github.com> 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//issues/25#issuecomment-174087843.

@cjwallgren
Copy link

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!

@thegreenrobot
Copy link
Owner

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

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