Open pfalcon opened 5 years ago
So, as docker setup is somewhat adhoc, there's no "obvious" way to restart lava-server process inside the container. The following works however:
docker exec -it lava-server bash
kill 1
This will kill entire container, but docker-compose will automatically restart it. This is definitely faster than restarting entire docker-compose setup.
However, making local file changes to be automatically picked up is better and possible:
Apply following patch:
/etc/lava-server/lava-server-gunicorn:
- # RELOAD="--reload"
+ RELOAD="--reload"
Then restart the container as described above.
lava-master has the same setup. kill 1
trick works. Whether it's possible to reload automatically isn't known.
(Note that at the time of writing, lite
branch doesn't have even commented setup for "dev" setup for lava-master.)
With "dev" setup, where we bind-mount a lava git checkout's subdirs inside containers (https://github.com/Linaro/lite-lava-docker-compose/blob/lite/docker-compose.yaml#L74, etc.), we have a setup when lava-dispatcher container picks up changes live, as corresponding files are edited locally.
However, this is not the case for lava-server container. Normal way to deal with this would be docker-compose stop/start, which is somewhat not dynamic.
This ticket is to both document the issue, so others were aware, and to find ways to deal with that.