-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
40 lines (30 loc) · 1.4 KB
/
justfile
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
_tmux_split_window:
#!/bin/bash
# Kill the tmux session if it already exists
tmux has-session -t docker-demo 2>/dev/null && tmux kill-session -t docker-demo
# Create a new tmux session, detached
tmux new-session -d -s docker-demo
# Split the window into two panes
tmux split-window -h
# Run talker and listener in a single Docker network - minimal example
docker-network-only:
docker compose -f compose.docker-network-only.yaml up
# Run the talker in a Docker container and the listener on the host machine
host-docker: _tmux_split_window
#!/bin/bash
# Select the first pane and run the Docker compose command
tmux send-keys -t docker-demo:0.0 'docker compose -f compose.host-docker.yaml up' C-m
# Select the second pane and run the ROS command
tmux send-keys -t docker-demo:0.1 'ros2 run demo_nodes_cpp listener' C-m
# Attach to the tmux session
tmux attach-session -t docker-demo
# Run talker and listener in Docker connected over the Internet with Husarnet VPN (Discovery Server Config)
husarnet-discovery-server: _tmux_split_window
#!/bin/bash
tmux send-keys -t docker-demo:0.0 'docker compose -f compose.husarnet-listener.yaml up' C-m
tmux send-keys -t docker-demo:0.1 'docker compose -f compose.husarnet-talker.yaml up' C-m
# Attach to the tmux session
tmux attach-session -t docker-demo
[private]
default:
@just --list --unsorted