Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/upright/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Upright::Service < FrozenRecord::Base
include Upright::Services::LiveStatus

def self.file_path
Rails.root.join("config", "services.yml").to_s
Upright.configuration.services_path.to_s
end

scope :public_facing, -> { where(public: true) }
Expand Down
8 changes: 8 additions & 0 deletions lib/upright/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class Upright::Configuration
attr_writer :probes_path
attr_writer :authenticators_path

# Public status page services definition (env-overridable, like probes_path)
attr_writer :services_path

# Playwright
attr_accessor :playwright_cli_path

Expand Down Expand Up @@ -57,6 +60,7 @@ def initialize
@frozen_record_path = nil
@probes_path = nil
@authenticators_path = nil
@services_path = nil

@probe_types = Upright::ProbeTypeRegistry.new

Expand Down Expand Up @@ -120,6 +124,10 @@ def probes_path
@probes_path || Rails.root.join("probes")
end

def services_path
@services_path || Rails.root.join("config", "services.yml")
end

def authenticators_path
@authenticators_path || Rails.root.join("probes", "authenticators")
end
Expand Down