80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
# Modbus integration-test fixture — pymodbus simulator.
|
|
#
|
|
# One service per profile. Bring up only the profile a test class needs;
|
|
# they all bind :5020 on the host so can't run concurrently. The compose
|
|
# `profiles:` feature gates which service spins up via `--profile <name>`.
|
|
#
|
|
# Usage:
|
|
# docker compose --profile standard up
|
|
# docker compose --profile dl205 up
|
|
# docker compose --profile mitsubishi up
|
|
# docker compose --profile s7_1500 up
|
|
services:
|
|
standard:
|
|
profiles: ["standard"]
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: otopcua-pymodbus:3.13.0
|
|
container_name: otopcua-pymodbus-standard
|
|
restart: "no"
|
|
ports:
|
|
- "5020:5020"
|
|
command: [
|
|
"pymodbus.simulator",
|
|
"--modbus_server", "srv",
|
|
"--modbus_device", "dev",
|
|
"--json_file", "/fixtures/standard.json"
|
|
]
|
|
|
|
dl205:
|
|
profiles: ["dl205"]
|
|
image: otopcua-pymodbus:3.13.0
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: otopcua-pymodbus-dl205
|
|
restart: "no"
|
|
ports:
|
|
- "5020:5020"
|
|
command: [
|
|
"pymodbus.simulator",
|
|
"--modbus_server", "srv",
|
|
"--modbus_device", "dev",
|
|
"--json_file", "/fixtures/dl205.json"
|
|
]
|
|
|
|
mitsubishi:
|
|
profiles: ["mitsubishi"]
|
|
image: otopcua-pymodbus:3.13.0
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: otopcua-pymodbus-mitsubishi
|
|
restart: "no"
|
|
ports:
|
|
- "5020:5020"
|
|
command: [
|
|
"pymodbus.simulator",
|
|
"--modbus_server", "srv",
|
|
"--modbus_device", "dev",
|
|
"--json_file", "/fixtures/mitsubishi.json"
|
|
]
|
|
|
|
s7_1500:
|
|
profiles: ["s7_1500"]
|
|
image: otopcua-pymodbus:3.13.0
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: otopcua-pymodbus-s7_1500
|
|
restart: "no"
|
|
ports:
|
|
- "5020:5020"
|
|
command: [
|
|
"pymodbus.simulator",
|
|
"--modbus_server", "srv",
|
|
"--modbus_device", "dev",
|
|
"--json_file", "/fixtures/s7_1500.json"
|
|
]
|