compose.yml•932 B
services:
server:
build: ..
container_name: mcp-can-server
environment:
- MCP_CAN_CAN_INTERFACE=virtual
- MCP_CAN_CAN_CHANNEL=bus0
- MCP_CAN_DBC_PATH=/home/pi/MCP-Demo/vehicle.dbc
- MCP_CAN_MCP_PORT=6278
working_dir: /home/pi/MCP-Demo
command: bash -lc "mcp-can server --port 6278"
ports:
- "6278:6278"
healthcheck:
test: ["CMD", "bash", "-lc", "python3 - <<PY\nimport socket,sys\ns=socket.socket()\n\ntry:\n s.connect((\"127.0.0.1\", 6278))\n s.close()\n sys.exit(0)\nexcept Exception:\n sys.exit(1)\nPY"]
interval: 30s
timeout: 5s
start_period: 20s
retries: 5
simulator:
build: ..
container_name: mcp-can-sim
environment:
- MCP_CAN_CAN_INTERFACE=virtual
- MCP_CAN_CAN_CHANNEL=bus0
- MCP_CAN_DBC_PATH=/home/pi/MCP-Demo/vehicle.dbc
working_dir: /home/pi/MCP-Demo
command: bash -lc "mcp-can simulate"