diff --git a/run/.env b/run/.env index 652ff7a..d1581db 100644 --- a/run/.env +++ b/run/.env @@ -9,6 +9,7 @@ IMAGE=ghcr.io/hyperledger/indy-node-container/indy_node:latest-ubuntu18 # You likely want to keep these default values: SOCK=/var/run/docker.sock NODE_CONTAINER_NAME=indy_node +CONTROLLER_CONTAINER=indy_node_controller IMAGE_NAME_CONTROLLER=ghcr.io/hyperledger/indy-node-container/indy_node_controller:latest INDY_NODE_IP=0.0.0.0 diff --git a/run/README.md b/run/README.md index 7584c74..6094f70 100644 --- a/run/README.md +++ b/run/README.md @@ -43,8 +43,10 @@ The log dir is mounted to `./log_indy` by default to ease access to the log file ## Node Controller -Our current approach to handle pool restarts is to have the node controller running in a separate service container which has access to the docker socket (`SOCK=/var/run/docker.sock` in the `.env` file which might have to be adapted depending on your local docker setting). You can run the node without the node controller with e.g. `docker-compose up --scale indy-controller=0`. Note however that such nodes will not participate in pool restarts. +Our current approach to handle pool restarts is to have the node controller running in a separate service container which has access to the docker socket. You can run the node without the node controller with e.g. `docker-compose up --scale indy-controller=0`. Note however that such nodes will not participate in pool restarts. -If the node controller container is running and has access to the docker socket of the host, the node will be restarted upon pool restart commands and will participate in a network upgrade. The decision mechanism for whether to accept or reject an upgrade based on avaiable deb package versions is part of indy node server and hence unchanged. However, if an upgrade is accepted, the container will be stopped, pulled, and restarted. Use a tag like `latest-ubuntu18` and make sure that a new `latest` image is avaiable bevor the network upgrade commences. +If wou want to use the node controller, the variables `SOCK`, `NODE_CONTAINER_NAME`, `CONTROLLER_CONTAINER`, and `IMAGE_NAME_CONTROLLER` need to be set in the `.env` file. Appropriate default values are set in [the default file](/.env). + +If the node controller container is running and has access to the docker socket of the host, the node will be restarted upon pool restart commands and will participate in a network upgrade. The decision mechanism for whether to accept or reject an upgrade based on available deb package versions is part of indy node server and hence unchanged. However, if an upgrade is accepted, the container will be stopped, pulled, and restarted. Use a tag like `latest-ubuntu18` and make sure that a new `latest` image is available before the network upgrade commences. diff --git a/run/docker-compose.yml b/run/docker-compose.yml index cd5be5e..df2cb69 100644 --- a/run/docker-compose.yml +++ b/run/docker-compose.yml @@ -25,10 +25,11 @@ services: indy-controller: image: ${IMAGE_NAME_CONTROLLER} init: true - container_name: indy_node_controller + container_name: ${CONTROLLER_CONTAINER} environment: - - CONTAINER=${NODE_CONTAINER_NAME} + - NODE_CONTAINER=${NODE_CONTAINER_NAME} - INDY_NETWORK_NAME=${INDY_NETWORK_NAME} + - CONTROLLER_CONTAINER=${CONTROLLER_CONTAINER} volumes: - ./etc_indy:/etc/indy - ${SOCK}:/var/run/docker.sock