Closed SvenMarcus closed 1 year ago
Really? What error message do you get?
AFAIK (and by my experience) these dependencies have no effect for services from disabled profiles.
If I delete the with-ocrd-controller
profile from the Makefile and start it, all services except the controller are started. Is it different for you @SvenMarcus ?
If I delete the
with-ocrd-controller
profile from the Makefile and start it
No need to edit the makefile! Just set COMPOSE_PROFILES in your shell.
No need to edit the makefile! Just set COMPOSE_PROFILES in your shell.
That's the royal road for the test, it was sufficient. :innocent:
Oh sorry, it was a mistake on my part. I accidentally read the wrong line in the documentation when looking up the default profile and ended up assuming it was just manager/monitor 🙃
One thing that we need to have a look at though, is that I need to define the controller variables in my .env
despite disabling the controller.
I get the following errors:
WARN[0000] The "CONTROLLER_BASE_VERSION" variable is not set. Defaulting to a blank string.
WARN[0000] The "CONTROLLER_IMAGE" variable is not set. Defaulting to a blank string.
WARN[0000] The "CONTROLLER_ENV_UMASK" variable is not set. Defaulting to a blank string.
WARN[0000] The "CONTROLLER_WORKERS" variable is not set. Defaulting to a blank string.
WARN[0000] The "CONTROLLER_WORKERS" variable is not set. Defaulting to a blank string.
3 error(s) decoding:
* error decoding 'Volumes[1]': invalid spec: :/models: empty section between colons
* error decoding 'Volumes[2]': invalid spec: :/config: empty section between colons
* error decoding 'Volumes[3]': invalid spec: :/data: empty section between colons
We could use $$
for these variables. The only problem is that there is no information if the variable is really empty.
https://docs.docker.com/compose/compose-file/compose-file-v2/#variable-substitution
One thing that we need to have a look at though, is that I need to define the controller variables in my
.env
despite disabling the controller.
I don't see the problem. Some of these variables denote where to reach the external instance – they are used by the Manager and Monitor. The others are just ignored. Since the .env is just a default and you can set variables in your environment, it suffices to export CONTROLLER_HOST=my.host.com CONTROLLER_PORT_SSH=123
. (And you can also use -e
or --env-file
customization.) No need to touch the (git-controlled) .env really, regardless of your profile.
I get the following errors:
How exactly does that happen?
IMO this is about the variables and volumes that are not needed for the connection of an external controller.
The others are just ignored.
@SvenMarcus Do these warnings appear even though the controller profile is disable?
No need to touch the (git-controlled) .env really, regardless of your profile.
@bertsky In this case the warning is only suppressed because the variables are set for another use case. Why should a warning appear for variables that are not needed?
Errors will be avoided with following pr https://github.com/slub/ocrd_controller/pull/27
Problem is fixed and merge into the master branch of controller repo. Please reopen if there is still a problem here.
The
ocrd-manager
andocrd-monitor
services depend on theocrd-controller
service. Therefore, I cannot launch the docker compose configuration without activating the controller.