fix(docker): generic naming (mosaic-*), env-var-only config, no hardcoded values
All checks were successful
ci/woodpecker/push/infra Pipeline was successful

- Renamed all jarvis-* to mosaic-* (generic for any deployment)
- Config files are .json.template with ${VAR} placeholders
- entrypoint.sh renders templates via envsubst at startup
- Ollama is optional: set OLLAMA_BASE_URL to auto-inject provider
- Model is configurable via OPENCLAW_MODEL env var
- No hardcoded IPs, keys, model names, or user preferences
- Updated README with full env var reference
This commit is contained in:
2026-03-01 08:02:31 -06:00
parent 50f0dc6018
commit 89767e26ef
20 changed files with 327 additions and 279 deletions

View File

@@ -1,14 +1,18 @@
# Mosaic Agent Fleet — OpenClaw Docker Swarm Stack
# Deploy: docker stack deploy -c docker/openclaw-compose.yml mosaic-agents
# All config via env vars — see openclaw-instances/*.env
services:
jarvis-main:
mosaic-main:
image: alpine/openclaw:latest
command: ["gateway", "run", "--bind", "lan", "--auth", "token"]
command: ["/config/entrypoint.sh"]
env_file:
- ./openclaw-instances/jarvis-main.env
- ./openclaw-instances/mosaic-main.env
environment:
OPENCLAW_CONFIG_PATH: /config/openclaw.json
OPENCLAW_CONFIG_PATH: /tmp/openclaw.json
volumes:
- jarvis-main-config:/config/openclaw.json:ro
- jarvis-main-state:/home/node/.openclaw
- mosaic-main-config:/config:ro
- mosaic-main-state:/home/node/.openclaw
networks:
- mosaic-stack_internal
healthcheck:
@@ -29,19 +33,19 @@ services:
reservations:
memory: 512M
labels:
- com.mosaic.agent=jarvis-main
- com.mosaic.agent=mosaic-main
- com.mosaic.role=orchestrator
jarvis-projects:
mosaic-projects:
image: alpine/openclaw:latest
command: ["gateway", "run", "--bind", "lan", "--auth", "token"]
command: ["/config/entrypoint.sh"]
env_file:
- ./openclaw-instances/jarvis-projects.env
- ./openclaw-instances/mosaic-projects.env
environment:
OPENCLAW_CONFIG_PATH: /config/openclaw.json
OPENCLAW_CONFIG_PATH: /tmp/openclaw.json
volumes:
- jarvis-projects-config:/config/openclaw.json:ro
- jarvis-projects-state:/home/node/.openclaw
- mosaic-projects-config:/config:ro
- mosaic-projects-state:/home/node/.openclaw
networks:
- mosaic-stack_internal
healthcheck:
@@ -54,7 +58,7 @@ services:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
delay: 10s
max_attempts: 3
resources:
limits:
@@ -62,19 +66,19 @@ services:
reservations:
memory: 1G
labels:
- com.mosaic.agent=jarvis-projects
- com.mosaic.role=development
- com.mosaic.agent=mosaic-projects
- com.mosaic.role=developer
jarvis-research:
mosaic-research:
image: alpine/openclaw:latest
command: ["gateway", "run", "--bind", "lan", "--auth", "token"]
command: ["/config/entrypoint.sh"]
env_file:
- ./openclaw-instances/jarvis-research.env
- ./openclaw-instances/mosaic-research.env
environment:
OPENCLAW_CONFIG_PATH: /config/openclaw.json
OPENCLAW_CONFIG_PATH: /tmp/openclaw.json
volumes:
- jarvis-research-config:/config/openclaw.json:ro
- jarvis-research-state:/home/node/.openclaw
- mosaic-research-config:/config:ro
- mosaic-research-state:/home/node/.openclaw
networks:
- mosaic-stack_internal
healthcheck:
@@ -87,7 +91,7 @@ services:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
delay: 10s
max_attempts: 3
resources:
limits:
@@ -95,19 +99,19 @@ services:
reservations:
memory: 256M
labels:
- com.mosaic.agent=jarvis-research
- com.mosaic.agent=mosaic-research
- com.mosaic.role=research
jarvis-operations:
mosaic-operations:
image: alpine/openclaw:latest
command: ["gateway", "run", "--bind", "lan", "--auth", "token"]
command: ["/config/entrypoint.sh"]
env_file:
- ./openclaw-instances/jarvis-operations.env
- ./openclaw-instances/mosaic-operations.env
environment:
OPENCLAW_CONFIG_PATH: /config/openclaw.json
OPENCLAW_CONFIG_PATH: /tmp/openclaw.json
volumes:
- jarvis-operations-config:/config/openclaw.json:ro
- jarvis-operations-state:/home/node/.openclaw
- mosaic-operations-config:/config:ro
- mosaic-operations-state:/home/node/.openclaw
networks:
- mosaic-stack_internal
healthcheck:
@@ -120,7 +124,7 @@ services:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
delay: 10s
max_attempts: 3
resources:
limits:
@@ -128,7 +132,7 @@ services:
reservations:
memory: 256M
labels:
- com.mosaic.agent=jarvis-operations
- com.mosaic.agent=mosaic-operations
- com.mosaic.role=operations
networks:
@@ -136,31 +140,11 @@ networks:
external: true
volumes:
jarvis-main-config:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker/openclaw-instances/jarvis-main.json
jarvis-projects-config:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker/openclaw-instances/jarvis-projects.json
jarvis-research-config:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker/openclaw-instances/jarvis-research.json
jarvis-operations-config:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker/openclaw-instances/jarvis-operations.json
jarvis-main-state:
jarvis-projects-state:
jarvis-research-state:
jarvis-operations-state:
mosaic-main-config:
mosaic-main-state:
mosaic-projects-config:
mosaic-projects-state:
mosaic-research-config:
mosaic-research-state:
mosaic-operations-config:
mosaic-operations-state: