runner.compose_generation

This file holds functions that generate docker-compose configuration files from templates, interpolating variables according to the derex project configuration.

They are invoked thanks to the @hookimpl call to the pluggy plugin system.

The functions have to be reachable under the common name ddc_project_options so a class is put in place to hold each of them.

Module Contents

Classes

BaseServices

BaseProject

LocalServices

LocalProject

LocalProjectRunmode

Functions

generate_ddc_project_compose(project: derex.runner.project.Project) → pathlib.Path

This function is called every time ddc-project is run.

generate_ddc_test_compose(project: derex.runner.project.Project) → pathlib.Path

This function assembles a docker-compose with test services for

generate_ddc_services_compose() → pathlib.Path

Generate the global docker-compose config file that will drive

Attributes

logger

runner.compose_generation.logger[source]
class runner.compose_generation.BaseServices[source]
static ddc_services_options()Dict[str, Union[str, List[str]]][source]

See derex.runner.plugin_spec.ddc_services_options docstring.

class runner.compose_generation.BaseProject[source]
static ddc_project_options(project: derex.runner.project.Project)Dict[str, Union[str, List[str]]][source]

See derex.runner.plugin_spec.ddc_project_options docstring

class runner.compose_generation.LocalServices[source]
static ddc_services_options()Dict[str, Union[str, List[str]]][source]

See derex.runner.plugin_spec.ddc_services_options docstring.

class runner.compose_generation.LocalProject[source]
static ddc_project_options(project: derex.runner.project.Project)Dict[str, Union[str, List[str]]][source]

See derex.runner.plugin_spec.ddc_project_options docstring

class runner.compose_generation.LocalProjectRunmode[source]
static ddc_project_options(project: derex.runner.project.Project)Dict[str, Union[str, List[str]]][source]

See derex.runner.plugin_spec.ddc_project_options docstring

runner.compose_generation.generate_ddc_project_compose(project: derex.runner.project.Project)pathlib.Path[source]

This function is called every time ddc-project is run. It assembles a docker-compose file from the given configuration. It should execute as fast as possible.

runner.compose_generation.generate_ddc_test_compose(project: derex.runner.project.Project)pathlib.Path[source]

This function assembles a docker-compose with test services for the given project. It should execute as fast as possible.

runner.compose_generation.generate_ddc_services_compose()pathlib.Path[source]

Generate the global docker-compose config file that will drive ddc-services and return its path.