-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend the worker config with
worker.ServiceAddress
(#1324)
The worker cache requires setting up the worker in a way we did not have to do before, namely registering webhooks with the bus so the worker gets notified when certain events take place on the bus. In single node setups or when you're on localhost everything works fine but in a distributed setup we are missing a way to define where the bus can reach the worker API. I came up with `serviceAddress` for now but I've gone back and forth quite a bit. I like `serviceAddress` because it ties in closely with docker services, I think we should call it `something-address` to be consistent with the rest of the config. I verified it using the following `docker-compose` file: ``` version: "3.9" services: bus: build: context: . dockerfile: ./docker/Dockerfile container_name: bus ports: - "9981:9980" environment: - RENTERD_AUTOPILOT_ENABLED=false - RENTERD_WORKER_ENABLED=false - RENTERD_WORKER_REMOTE_ADDRS=http://worker:9980/api/worker - RENTERD_WORKER_API_PASSWORD=test - RENTERD_API_PASSWORD=test - RENTERD_SEED=[seed here] worker: build: context: . dockerfile: ./docker/Dockerfile container_name: worker ports: - "9982:9980" environment: - RENTERD_AUTOPILOT_ENABLED=false - RENTERD_BUS_REMOTE_ADDR=http://bus:9980/api/bus - RENTERD_BUS_API_PASSWORD=test - RENTERD_WORKER_API_PASSWORD=test - RENTERD_WORKER_SERVICE_ADDR=http://worker:9980 - RENTERD_API_PASSWORD=test - RENTERD_SEED=[seed here] healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:9980/api/worker || exit 1"] interval: 30s timeout: 10s retries: 5 ``` Fixes #1302 --------- Co-authored-by: Christopher Schinnerl <[email protected]>
- Loading branch information
1 parent
281f92f
commit 5cd3cb3
Showing
4 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters