Fix container HEALTHCHECK
when port 0
is used in confguration
#524
Labels
- Admin -
Enjoyable to Install and Setup our Software
- Developer -
Torrust Improvement Experience
Blocked
Has Unsatisfied Dependency or blocked by a contributor.
Quality & Assurance
Relates to QA, Testing, and CI
Milestone
Context
We have a
HEALTHCHECK
instruction in theContainerfile
:The implementation is here. It checks that all services are running:
For the API, for example, it tries to connect to the API healthcheck endpoint.
In the API configuration (
Config.toml
):you can specify the port = like this:
In that case, the application will assign a free port.
Problem
The healthcheck endpoint relies on static configuration. If you use port 0 the healthcheck skippies that service. We need to pass the list of actual ports to the "healthchecker" instead of the configuration.
Solution
When we run the services we have to send back the port used to the main app. And the main app has to inject that configuration (list of services and ports) to the "healthchecker".
Relates To
0
(uses a random unused port) works, but does not inform what port it bound to #186The text was updated successfully, but these errors were encountered: