Skip to content

gufo.thor.services.noc

NocService base class.

NocHcService

Bases: NocService

Noc service with healthcheck.

NocService

Bases: BaseService

Basic class for all NOC's services.

get_compose_command(svc=None)

Get command section.

get_compose_environment(svc=None)

Get environment section.

get_compose_extra(svc=None)

Set caps.

get_compose_image(svc=None)

Get docker-compose.yml image section.

Use a service-specific or global NOC tag when configured.

Parameters:

Name Type Description Default
svc ServiceConfig | None

Service's config from services part, if any.

None

Returns:

Type Description
str

Image name.

get_compose_volumes(svc=None)

Get volumes section.

Mount repo and custom when necessary.

get_compose_volumes_config(svc=None)

Generate crashinfo and backup volume.

get_noc_settings()

Get data for settings.yml.

Returns:

Type Description
dict[str, Any]

Data which can be serialized to settings.yml.

prepare_compose_config(svc=None, *, services)

Render configuration files.

NB: As the NocServices is the base class for a bunch of services, ensure, the configuration files are rendered only once.