remove container names, use project name for docker-compose

This commit is contained in:
Burak Ozter 2024-11-01 15:32:43 -03:00
parent 3078feb2fb
commit d661b1df33
2 changed files with 2 additions and 5 deletions

View File

@ -45,7 +45,6 @@ services:
# - nvidia.com/gpu=all # - nvidia.com/gpu=all
ardupilot: ardupilot:
container_name: ardupilot-$DRONE_SYS_ID
env_file: env_file:
- .env - .env
image: git.spirirobotics.com/spiri/ardupilot:spiri-master image: git.spirirobotics.com/spiri/ardupilot:spiri-master
@ -62,7 +61,6 @@ services:
network_mode: host network_mode: host
mavproxy: mavproxy:
container_name: mavproxy-$DRONE_SYS_ID
env_file: env_file:
- .env - .env
image: git.spirirobotics.com/spiri/services-mavproxy:main image: git.spirirobotics.com/spiri/services-mavproxy:main
@ -80,7 +78,6 @@ services:
restart: always restart: always
mavros2: mavros2:
container_name: mavros2-$DRONE_SYS_ID
env_file: env_file:
- .env - .env
image: git.spirirobotics.com/spiri/services-ros2-mavros:main image: git.spirirobotics.com/spiri/services-ros2-mavros:main
@ -107,7 +104,6 @@ services:
mavros: mavros:
#This service bridges our mavlink-based robot-coprosessor into ROS #This service bridges our mavlink-based robot-coprosessor into ROS
#In this example it connects to a simulated coprocessor. #In this example it connects to a simulated coprocessor.
container_name: mavros1-$DRONE_SYS_ID
env_file: env_file:
- .env - .env
image: git.spirirobotics.com/spiri/services-ros1-mavros:master image: git.spirirobotics.com/spiri/services-ros1-mavros:master
@ -128,7 +124,6 @@ services:
hard: 524288 hard: 524288
ros-master: ros-master:
container_name: ros-master
env_file: env_file:
- .env - .env
image: git.spirirobotics.com/spiri/services-ros1-core:main image: git.spirirobotics.com/spiri/services-ros1-core:main

View File

@ -108,6 +108,8 @@ def start(tracker_instance: int = 0, sys_id: int = 1):
docker_stack = sh.docker.compose( docker_stack = sh.docker.compose(
"--profile", "--profile",
"uav-sim", "uav-sim",
"-p",
f"spiri-sdk-{sys_id}",
"up", "up",
_out=outputLogger("docker_stack", sys_id), _out=outputLogger("docker_stack", sys_id),
_err=sys.stderr, _err=sys.stderr,