Class: GDK::Services::GitlabHttpRouter
- Inherits:
-
Base
- Object
- Base
- GDK::Services::GitlabHttpRouter
show all
- Defined in:
- lib/gdk/services/gitlab_http_router.rb
Constant Summary
collapse
- BASE_COMMAND =
"support/exec-cd gitlab-http-router npx wrangler dev -e dev"
- TOPOLOGY_SERVICE_COMMAND =
' --var GITLAB_TOPOLOGY_SERVICE_URL:http://localhost:%{port}'
- HTTPS_COMMAND =
' --local-protocol https --https-key-path %{key_path} --https-cert-path %{certificate_path}'
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #procfile_entry
Instance Method Details
#command ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/gdk/services/gitlab_http_router.rb', line 16
def command
base_command = BASE_COMMAND.dup
base_command << format(TOPOLOGY_SERVICE_COMMAND, { port: config.gitlab_topology_service.rest_port }) if config.gitlab_topology_service.enabled?
return base_command unless config.https?
base_command << format(HTTPS_COMMAND, { key_path: key_path, certificate_path: certificate_path })
end
|
#enabled? ⇒ Boolean
30
31
32
|
# File 'lib/gdk/services/gitlab_http_router.rb', line 30
def enabled?
config.gitlab_http_router.enabled?
end
|
#env ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/gdk/services/gitlab_http_router.rb', line 34
def env
return super unless config.https?
{
NODE_EXTRA_CA_CERTS: "$(mkcert -CAROOT)/rootCA.pem"
}
end
|
#name ⇒ Object
12
13
14
|
# File 'lib/gdk/services/gitlab_http_router.rb', line 12
def name
'gitlab-http-router'
end
|
#ready_message ⇒ Object
26
27
28
|
# File 'lib/gdk/services/gitlab_http_router.rb', line 26
def ready_message
"The HTTP Router is available at #{listen_address}."
end
|