2024-08-08 14:11:30 -03:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
|
|
|
xbnet0:
|
|
|
|
build: .
|
|
|
|
container_name: xbnet0
|
|
|
|
privileged: true
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
devices:
|
|
|
|
- "${XBEE0_PORT}:${XBEE0_PORT}"
|
|
|
|
command: >
|
|
|
|
bash -c "
|
|
|
|
set -x;
|
2024-08-09 16:21:47 -03:00
|
|
|
xbnet -d --serial-speed ${XBEE0_BAUDRATE} ${XBEE0_PORT} tun;
|
2024-08-08 14:11:30 -03:00
|
|
|
ip addr add ${XBEE0_NET_IP}/24 dev xbnet0;
|
|
|
|
ip link set dev xbnet0 up;
|
|
|
|
ping -c 4 ${PING0_TARGET};
|
|
|
|
sleep infinity
|
|
|
|
"
|
|
|
|
|
|
|
|
xbnet1:
|
|
|
|
build: .
|
|
|
|
container_name: xbnet1
|
|
|
|
privileged: true
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
devices:
|
|
|
|
- "${XBEE1_PORT}:${XBEE1_PORT}"
|
|
|
|
command: >
|
|
|
|
bash -c "
|
|
|
|
set -x;
|
2024-08-09 16:21:47 -03:00
|
|
|
xbnet -d --serial-speed ${XBEE1_BAUDRATE} ${XBEE0_PORT} tun;
|
2024-08-08 14:11:30 -03:00
|
|
|
ip addr add ${XBEE1_NET_IP}/24 dev xbnet1;
|
|
|
|
ip link set dev xbnet1 up;
|
|
|
|
ping -c 4 ${PING1_TARGET};
|
|
|
|
sleep infinity
|
|
|
|
"
|