🚧 WIP
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Service deployment for the WAGO Modbus TCP simulator.
|
||||
#
|
||||
# docker compose up -d # start
|
||||
# docker compose logs -f wago-sim
|
||||
# docker compose down # graceful stop (SIGTERM -> clean shutdown)
|
||||
#
|
||||
# Node configuration: mount ./config and ./scenarios read-only and point
|
||||
# WAGO_SIM_NODE at the desired node file. Host port 5020 by default —
|
||||
# change to 502 if the bench master expects it and your host allows it.
|
||||
|
||||
services:
|
||||
wago-sim:
|
||||
build: .
|
||||
image: wago-sim:latest
|
||||
container_name: wago-sim
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5020:502" # host:container — WAGO_SIM_PORT sets the inner port
|
||||
environment:
|
||||
WAGO_SIM_NODE: config/pump_node.yaml
|
||||
WAGO_SIM_HOST: 0.0.0.0
|
||||
WAGO_SIM_PORT: "502"
|
||||
# Uncomment to trace every Modbus transaction in plain text:
|
||||
# WAGO_SIM_VERBOSE: "1"
|
||||
volumes:
|
||||
- ./config:/app/config:ro
|
||||
- ./scenarios:/app/scenarios:ro
|
||||
- ./plugins:/app/plugins:ro
|
||||
# Report output for headless `run` invocations (spec §8 soak reports):
|
||||
- ./out:/app/out
|
||||
# Deterministic sim is CPU-light; keep 1 CPU for a stable FAT bench
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1.0"
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c",
|
||||
"import socket,os;socket.create_connection(('127.0.0.1',int(os.environ['WAGO_SIM_PORT'])),timeout=3).close()"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
Reference in New Issue
Block a user