By gunitmittal
Currently, I am able to the same but with only one container by assigning static ip addresses to the container. Not sure how to implement this for multiple ones. Each rtu needs to have a diff IP adress and be associated with a ctrl unit. This ctrl unit is then connected to a network, linked to a gateway.
services:
rtu_a:
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
image: ${REGISTRY_PREFIX}testbed/modbus${REGISTRY_TAG}
volumes:
- ./volume:/var/lib/my_volume
build:
context: .
cache_from:
- ${REGISTRY_PREFIX}modbus${REGISTRY_TAG}
- ${REGISTRY_PREFIX}modbus:${CI_COMMIT_REF_SLUG}
- ${REGISTRY_PREFIX}modbus:master
networks:
rtu-ctrl-net-a:
ipv4_address: 172.31.0.101
command: python3 rtu_unit.py "rtu_a"
ctrl_unit_a:
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
image: ${REGISTRY_PREFIX}testbed/modbus${REGISTRY_TAG}
volumes:
- ./volume:/var/lib/my_volume
depends_on:
- rtu_a
networks:
rtu-ctrl-net-a:
ipv4_address: 172.31.0.102
command: python3 ctrl_unit.py rtu_a 1 "ctrl_unit_a"
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Im not expert on this but I think you need to fix the network it self and connections
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.