File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 4
4
"predeploy" : " bundle exec rails db:migrate && bundle exec rails assets:precompile" ,
5
5
"postdeploy" : " if [ -n \" $DISCORD_WEBHOOK_URL\" ]; then JSON_STRING=\" {\\\" content\\\" :\\\" [$GIT_REV](https://github.com/jcraigk/phishin/commit/$GIT_REV) successfully deployed\\\" }\" ; curl -X POST -H 'Content-Type: application/json' --data \" $JSON_STRING\" $DISCORD_WEBHOOK_URL; fi"
6
6
}
7
+ },
8
+ "healthchecks" : {
9
+ "web" : [
10
+ {
11
+ "type" : " startup" ,
12
+ "name" : " web check" ,
13
+ "path" : " /health" ,
14
+ "timeout" : 3 ,
15
+ "attempts" : 3 ,
16
+ "wait" : 5
17
+ }
18
+ ]
7
19
}
8
20
}
Original file line number Diff line number Diff line change 1
1
require "sidekiq/web"
2
2
3
3
Rails . application . routes . draw do
4
+ get "/health" , to : proc { [ 200 , { } , [ "OK" ] ] }
5
+
4
6
Sidekiq ::Web . use Rack ::Auth ::Basic do |username , password |
5
7
ActiveSupport ::SecurityUtils . secure_compare (
6
8
::Digest ::SHA256 . hexdigest ( username ) , ::Digest ::SHA256 . hexdigest ( ENV [ "SIDEKIQ_USERNAME" ] )
You can’t perform that action at this time.
0 commit comments