-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.talker.yaml
48 lines (44 loc) · 1.21 KB
/
compose.talker.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
39
40
41
42
43
44
45
46
47
48
# TL;DR
# docker compose -f compose.talker.yaml up
services:
talker:
build: .
network_mode: service:husarnet-talker
volumes:
- ./fastdds_client.xml:/fastdds_client.xml
environment:
- FASTRTPS_DEFAULT_PROFILES_FILE=/fastdds_client.xml
- DS_HOSTNAME=dds-discovery-server
command:
- bash
- -c
- |
/wait_ds.sh
ros2 run demo_nodes_cpp talker
listener-local:
build: .
network_mode: service:husarnet-talker
volumes:
- ./fastdds_client.xml:/fastdds_client.xml
environment:
- FASTRTPS_DEFAULT_PROFILES_FILE=/fastdds_client.xml
- DS_HOSTNAME=dds-discovery-server
command:
- bash
- -c
- |
/wait_ds.sh
ros2 run demo_nodes_cpp listener
husarnet-talker:
image: husarnet/husarnet
volumes:
- /var/lib/husarnet # This will persist your Husarnet Client keys, thus IP of the container will be stable/the same between (re)boots
sysctls:
- net.ipv6.conf.all.disable_ipv6=0 # Husarnet is using IPv6 for the internal connections
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
environment:
- HOSTNAME=talker
- JOINCODE=${HUSARNET_JOINCODE}