feat(docker): Add worker service config for SupervisorD

ref: #363 #371
This commit is contained in:
2024-10-31 15:00:55 +09:30
parent 4303232543
commit 8479130ef1
4 changed files with 35 additions and 1 deletions

View File

@ -50,7 +50,7 @@ The [web container](https://hub.docker.com/r/nofusscomputing/centurion-erp) is t
### Background Worker Container
The [Background Worker container](https://hub.docker.com/r/nofusscomputing/centurion-erp) is a worker that waits for tasks sent to the RabbitMQ server. The worker is based upon [Celery](https://docs.celeryq.dev/en/stable/index.html). On the worker not being busy, it'll pickup and run the task. This container is scalable with nil additional requirements for launching additional workers. If deploying to Kubernetes the setting the deployment `replicas` to the number of desired containers is the simplest method to scale. The container start command will need to be set to `celery -A app worker -l INFO` so that the worker is started on container startup.
The [Background Worker container](https://hub.docker.com/r/nofusscomputing/centurion-erp) is a worker that waits for tasks sent to the RabbitMQ server. The worker is based upon [Celery](https://docs.celeryq.dev/en/stable/index.html). On the worker not being busy, it'll pickup and run the task. This container is scalable with nil additional requirements for launching additional workers. If deploying to Kubernetes the setting the deployment `replicas` to the number of desired containers is the simplest method to scale. There is no container start command, however you will need to set environmental variable `IS_WORKER` to value `'True'` within the container.
Configuration for the worker resides in directory `/etc/itsm/` within the container. see below for the `CELERY_` configuration.