Save application on a distributed system managed by the Dispatcher Master). This is a service where its main purpose is to process tasks sent by master.
See also:
Pre-requisites:
- Install Docker and Docker Compose.
- Create a new worker in the Dispatcher Web Interface, download the configuration file and put it in the target machine.
Replace the environment variable values and run the following snippet:
export WORKER_CONFIG_FILE=<path to configuration file>
sudo mkdir -p /opt/dispatcher-worker
cd /opt/dispatcher-worker
sudo curl -L https://raw.githubusercontent.com/comnetunb/dispatcher-worker/master/docker-compose.yml -o docker-compose.yml
sudo mv $WORKER_CONFIG_FILE ./config.json
chmod 600 ./config.json
export DISPATCHER_WORKER_CONFIG_FILE=$(readlink -f ./config.json)
sudo docker-compose up -d
After installing Node, download and run the Worker with:
$ git clone https://github.com/comnetunb/dispatcher-worker
$ cd dispatcher-worker
$ npm install
$ npm run dev
If you'd like to change the Configuration file, open it at dispatcher-worker/config/config.sample.json
.
For now, here is the checklist:
- Commit everything
- Bump package json version and commit again
- Build the docker image
- Push both repo and docker image