{% include 'roles/sys-svc-compose/templates/base.yml.j2' %} {% set service_name = 'openclaw' %} {{ service_name }}: {% include 'roles/sys-svc-container/templates/base.yml.j2' %} {{ lookup('container_image', application_id, 'openclaw') }} {{ lookup('compose_only', 'container_name', OPENCLAW_CONTAINER) }} {% if 'svc-ai-robot' in group_names %} devices: {% for device in ROBOT_DEVICE_ALLOWLIST %} - {{ device }} {% endfor %} {% elif lookup('config', application_id, 'services.kata.enabled') | bool %} {{ lookup('compose_only', 'runtime', SANDBOX_RUNTIME) }} {% endif %} user: "0:0" command: ["node", "dist/index.js", "gateway", "run", "--bind", "lan", "--port", "{{ OPENCLAW_PORT_INTERNAL }}"] healthcheck: test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:{{ OPENCLAW_PORT_INTERNAL }}/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 2m timeout: 5s retries: 5 start_period: 10m start_interval: 5s {{ lookup('container_ports', ['openclaw', 'http', DOCKER_BIND_HOST]) | indent(4) }} {{ lookup('container_volumes', service_name) | indent(4) }} {{ lookup('container_networks') | indent(4) }} {{ lookup('container_depends_on', application_id) | indent(4) }} {{ lookup('compose_networks') }} {{ lookup('compose_volumes') }}