It took me some time to inspect the Dockerfile and entrypoint to understand how they were built.
Here’s how to run the image as a worker:
-
Copy config.json from the master server to the worker server.
-
(Optional) If the master and worker are not on the same network, add an "ip" entry to config.json with the worker’s IP address.
- If using a VPN tunnel, set it to the VPN tunnel IP (e.g.,
10.8.0.2).
Example config.json on the worker:
{
"ip": "10.8.0.2",
"base_app_url": "http://localhost:3012",
"email_from": "admin@localhost",
"smtp_hostname": "localhost",
"secret_key": "the-secret-key-from-master-config",
...
}
-
Add the following environment variables in your docker-compose.yml or docker run command:
- IS_WORKER=true
- HOSTNAME=synology # change to your desired worker name
- Run the worker then add its ip (i.e. 10.8.0.2) in master's GUI
It took me some time to inspect the
Dockerfileandentrypointto understand how they were built.Here’s how to run the image as a worker:
Copy
config.jsonfrom the master server to the worker server.(Optional) If the master and worker are not on the same network, add an
"ip"entry toconfig.jsonwith the worker’s IP address.10.8.0.2).Example
config.jsonon the worker:{ "ip": "10.8.0.2", "base_app_url": "http://localhost:3012", "email_from": "admin@localhost", "smtp_hostname": "localhost", "secret_key": "the-secret-key-from-master-config", ... }Add the following
environment variablesin yourdocker-compose.ymlordocker runcommand: