Moin,
I'm using https://git.lavasoftware.org/lava/pkg/docker-compose to build example setups with LAVA and I want to add a second remote worker. Therefore I set the URL and DC_DISPATCHER_HOSTNAME in .env and run `docker-compose up lava-dispatcher`. Sadly the dispatcher always tries to connect to "lava-server" dispite that the correct URL is passed via environment variables into the container.
It looks like the value gets overwritten in https://git.lavasoftware.org/lava/lava/-/blob/master/docker/share/entrypoint...
as the lava-worker file looks like this inside the container.
... # Logging level should be uppercase (DEBUG, INFO, WARN, ERROR) # LOGLEVEL="DEBUG"
# Server connection URL="http://lava-server:8000/" # TOKEN="--token <token>" WS_URL="--ws-url http://lava-publisher:8001/ws/"
After digging around a bit I found out, that this environment file comes from https://git.lavasoftware.org/lava/pkg/docker-compose/-/blob/master/overlays/...
This practically disables the possibility of configuring the worker via the .env of the docker-compose repo.
The order of defaults loading in https://git.lavasoftware.org/lava/lava/-/blob/master/docker/share/entrypoint... should be changed, so that the importing from the lava-worker file happens first and the environment variable is applied afterwards.
Overall there are two defaults here and two possibilities to configure the worker, which is a bit confusing and redundant. Imho the .env from the docker-compose repo is a known and established way of configuring containers and should be preferred.
Regards, Beni
lava-users@lists.lavasoftware.org