DatabaseAPI IPs are read directly from the .env file, creating challenges within a docker container context as the docker image must be built with the configuration.
The latest searchseco/controller Docker Image on Docker Hub currently has an error within it's .env file:
docker pull searchseco/controller
docker run -ti --rm --entrypoint /bin/bash searchseco/controller
root@cea3c05c0d8b:/# cat /controller/build/.env
API_IPS=API_IPS=131.211.31.176?8003,131.211.31.179?8003,131.211.31.183?8003
So running the container fails:
docker run --rm --name controller-container -e github_token=xxxxx -e worker_name=xxxxx searchseco/controller
2022-09-14 06:55:01.644 ( 0.006s) [controller ] commands.cpp:516 INFO| Starting a worker node with 4 cpu cores
2022-09-14 06:55:01.644 ( 0.006s) [controller ] networking.cpp:196 ERR| E019 - No IPs found in .env file. IPs should be in format API_IPS=ip1?port1,ip2?port2
It would be useful to be able to set the API_IPS at runtime, for example:
docker run --rm --name controller-container -e github_token=xxxxx -e worker_name=xxxxx -e "API_IPS=138.201.216.223?8003,95.217.155.82?8003" searchseco/controller
A potential solution could use a bash script as the Dockerfile ENTRYPOINT to intercept configuration from the environment and write it to the .env file before calling searchseco start.
DatabaseAPI IPs are read directly from the
.envfile, creating challenges within a docker container context as the docker image must be built with the configuration.The latest searchseco/controller Docker Image on Docker Hub currently has an error within it's
.envfile:So running the container fails:
It would be useful to be able to set the
API_IPSat runtime, for example:docker run --rm --name controller-container -e github_token=xxxxx -e worker_name=xxxxx -e "API_IPS=138.201.216.223?8003,95.217.155.82?8003" searchseco/controllerA potential solution could use a bash script as the Dockerfile
ENTRYPOINTto intercept configuration from the environment and write it to the.envfile before callingsearchseco start.