tl;dr this update fixes handling of config.js options specified as environmental variables in a docker compose.yaml.
Improved env var handling
No changes were made to the underlying script source files.
Instead, I created src/updateConfig.js which reads the environmental variables from the compose.yaml and updates dist/config.json in the containerized script. Default values are used if any env var is not specified in the compose.yaml.
Update to compose.yaml required
See sample, at minimum remove previous volumes mapping
You no longer need WORKERS_ or SEARCHSETTINGS in front of values that fall under those categories in the config.json.
For example, change your compose env var from SEARCH_SETTINGS_SEARCH_DELAY_MIN to SEACH_DELAY_MIN.
Again, users only need to specify options that they want to change from the default values. They can do this in the config.json directly or by using environmental variables.
Docker QOL improvements and fixes
use docker compose up -d and the docker image will be built on the first run without the need for a --build tag. Then, if a user makes any changes to the compse, they just need to update the docker container using the same docker compose up -d and no longer need to build a new image.
For example, turn off scrolling, by setting the env var in the compose to false, then use docker compose up -d as usual. The container will be recreated and the script will run with the updated value (much quicker)
TZ should now be passed properly to cron runs of the script as well.
troubleshooting 'local' issues
Some users were reporting that they needed to install node.js locally or run the script npm run build once before running docker. FIX: if a local script was ever created prior to switching to docker, it would be best to remove /dist and /node_module from the source code folder prior to using docker. AFAIK, these folders were pulled into the workdir of docker and causing issues.
I added this to the Readme.
Docker implementation is 100% containerized (tested on a clean system).
tl;dr this update fixes handling of config.js options specified as environmental variables in a docker compose.yaml.
Improved env var handling
Update to compose.yaml required
volumes
mappingDocker QOL improvements and fixes
docker compose up -d
and the docker image will be built on the first run without the need for a--build
tag. Then, if a user makes any changes to the compse, they just need to update the docker container using the samedocker compose up -d
and no longer need to build a new image.false
, then usedocker compose up -d
as usual. The container will be recreated and the script will run with the updated value (much quicker)troubleshooting 'local' issues
I think that covers everything!