Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save docker-logs to the host #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,7 @@ cython_debug/

# Local History for Visual Studio Code
.history/
tmp/*
tmp/*

# docker logs
/logs
21 changes: 21 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ version: "3"
services:
roscore:
build: ./roscore/
volumes:
- "./logs/roscore:/root/.ros/"
command: stdbuf -o L roscore

mavros:
build: ./mavros/
depends_on:
- roscore
volumes:
- "./logs/mavros:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"

Expand All @@ -16,6 +20,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/arm:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "arm.py"]
Expand All @@ -25,6 +31,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/box:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "box.py"]
Expand All @@ -34,6 +42,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/geofence:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "geofence.py"]
Expand All @@ -43,6 +53,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/gimbal:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "gimbal.py"]
Expand All @@ -52,6 +64,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/hover:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "hover.py"]
Expand All @@ -63,13 +77,17 @@ services:
- mavros
environment:
- "ROS_MASTER_URI=http://roscore:11311"
volumes:
- "./logs/indoor_sensors:/root/.ros/"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "indoor_sensors.py"]

rc_failsafe:
build: .
depends_on:
- roscore
- mavros
volumes:
- "./logs/rc_failsafe:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "rc_failsafe.py"]
Expand All @@ -79,6 +97,8 @@ services:
depends_on:
- roscore
- mavros
volumes:
- "./logs/sensors:/root/.ros/"
environment:
- "ROS_MASTER_URI=http://roscore:11311"
command: ["stdbuf", "--output=L", "rosrun", "dr_hardware_tests", "sensors.py"]
Expand All @@ -94,4 +114,5 @@ services:
- ./nodes:/opt/ros/noetic/lib/dr_hardware_tests
- ./src/dr_hardware_tests/:/opt/ros/noetic/lib/python3/dist-packages/dr_hardware_tests
- ./launch:/opt/ros/noetic/share/dr_hardware_tests/launch
- "./logs/dev_test:/root/.ros/"
command: ["stdbuf", "--output=L", "bash"]