-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
38 lines (35 loc) · 1.11 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: ${CHATTER_ROLE:-listener}
services:
add_two_ints:
build: .
restart: unless-stopped
command: ros2 run demo_nodes_cpp add_two_ints_${ADD_TWO_INTS_ROLE:-server}
chatter:
build: .
environment:
- RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION:-rmw_fastrtps_cpp}
command: ros2 run demo_nodes_cpp ${CHATTER_ROLE:-listener}
ros2router:
image: husarnet/ros2router:1.9.1
network_mode: service:husarnet
depends_on:
husarnet: { condition: service_healthy } # husarnet service is healthy if all hosts listed in WAIT_HOSTNAMES are reachable
volumes:
- ./filter.yaml:/filter.yaml
environment:
- PARTICIPANTS=husarnet,if-eth0 # eth0 -is the name of the network interface from a Docker network in the container
husarnet:
image: husarnet/husarnet:2.0.180
volumes:
- /var/lib/husarnet
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
environment:
- HOSTNAME=${CHATTER_ROLE:-listener}-host
- JOINCODE
# - HUSARNET_DEBUG=1
- WAIT_HOSTNAMES=talker-host, listener-host