Files
obs-deploy/obs/templates/docker-compose/worker/docker-compose.yml
2025-11-13 15:56:45 +08:00

18 lines
520 B
YAML

services:
worker:
build:
dockerfile: Dockerfile.worker
context: .
environment:
OBS_REPO_SERVER: http://{{ (groups['obs_repo'][0] | extract(hostvars))['ansible_host'] }}:{{ (groups['obs_repo'][0] | extract(hostvars))['PORT'] }}
WORKER_ID: {{ID}}
WORKER_JOBS: {{JOBS}}
WORKER_ARCH: {{ARCH}}
WORKER_HOSTLABEL: {{LABEL}}
ports:
- 0.0.0.0:{{ PORT }}:15252
volumes:
- ./volume/worker:/srv/obsworker/state
restart: unless-stopped
privileged: true