Workers are defined along with your app's code.
Add a key to your app's yaml configuration called workers
, and define one or more workers and the start
command. For example:
workers:
queue:
size: S
commands:
start: |
./worker.sh
Workers run in their own container, but they use the same image as their parent app, so your worker code should be included in the same place as your app's code.
For more information on this feature, please see the following page in the Platform.sh documentation:
https://docs.platform.sh/create-apps/app-reference.html#workers