Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fqjony committed Jan 7, 2025
1 parent d83d6b2 commit f6d9ef0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/configs/_worker_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,19 @@ services:
* `autorestart`: Specifies whether the service should automatically restart if it stops. If "true", the service will restart according to the policy defined by the worker management system. The default value is "false", indicating the service will not restart automatically.

* `envs`: An array of environment variables passed to the service in the format `KEY=value`. These variables are made available to the service at runtime.

## Usage

To use these configuration file, ensure that the `services.yml` file is correctly configured and placed in the appropriate directory (`/etc/worker`) within the container.

### Volume Mount

If you have a worker configuration outside of the worker image, you can mount it as a volume into the container:

```shell
docker run -d --name udx-worker \
--env-file .env \
-v $(pwd)/my-tasks:/usr/src/app \
-v $(pwd)/src/configs/services.yml:/etc/worker \
usabilitydynamics/udx-worker:latest
```

0 comments on commit f6d9ef0

Please sign in to comment.