Repository: nautobot/nautobot

Issue:
"docker-compose: command not found" when running invoke commands on ltm-1.6
<!--
    NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.

    This form is only for reporting reproducible bugs. If you need assistance
    with Nautobot installation, or if you have a general question, please start a
    discussion instead: https://github.com/nautobot/nautobot/discussions

    Please describe the environment in which you are running Nautobot. Be sure
    that you are running an unmodified instance of the latest stable release
    before submitting a bug report, and that any plugins have been disabled.
-->
### Environment
* Nautobot version (Docker tag too if applicable): v1.6.12
* Python version:
* Database platform, version:
* Middleware(s):

<!--
    Describe in detail the exact steps that someone else can take to reproduce
    this bug using the current stable release of Nautobot. Begin with the
    creation of any necessary database objects and call out every operation
    being performed explicitly. If reporting a bug in the REST API, be sure to
    reconstruct the raw HTTP request(s) being made: Don't rely on a client
    library such as pynautobot.
-->
### Steps to Reproduce
1. Install a recent version of docker
2. Run "invoke debug"


<!-- What did you expect to happen? -->
### Expected Behavior
Nautobot starts

<!-- What happened instead? -->
### Observed Behavior
```
Starting Nautobot in debug mode...
Running docker-compose command "up"
PYTHON_VER=3.9 \
docker-compose \
    --project-name "nautobot" \
    --project-directory "/home/gary/github/nautobot/development" \
    -f "/home/gary/github/nautobot/development/docker-compose.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.postgres.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.dev.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.override.yml" up
/bin/bash: line 1: docker-compose: command not found
(nautobot-DIHtVAwE-py3.11) gary@debian:~/github/nautobot (ltm-1.6)$ vi ~/.bashrc
(nautobot-DIHtVAwE-py3.11) gary@debian:~/github/nautobot (ltm-1.6)$ vi ~/.bashrc
(nautobot-DIHtVAwE-py3.11) gary@debian:~/github/nautobot (ltm-1.6)$ docker-compose() { docker compose "$@"; }
(nautobot-DIHtVAwE-py3.11) gary@debian:~/github/nautobot (ltm-1.6)$ inv debug
Starting Nautobot in debug mode...
Running docker-compose command "up"
PYTHON_VER=3.9 \
docker-compose \
    --project-name "nautobot" \
    --project-directory "/home/gary/github/nautobot/development" \
    -f "/home/gary/github/nautobot/development/docker-compose.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.postgres.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.dev.yml" \
    -f "/home/gary/github/nautobot/development/docker-compose.override.yml" up
/bin/bash: line 1: docker-compose: command not found
```


Discussion:

Resolving patch:
diff --git a/tasks.py b/tasks.py
--- a/tasks.py
+++ b/tasks.py
@@ -139,15 +139,15 @@ def print_command(command, env=None):
 
 
 def docker_compose(context, command, **kwargs):
-    """Helper function for running a specific docker-compose command with all appropriate parameters and environment.
+    """Helper function for running a specific docker compose command with all appropriate parameters and environment.
 
     Args:
         context (obj): Used to run specific commands
-        command (str): Command string to append to the "docker-compose ..." command, such as "build", "up", etc.
+        command (str): Command string to append to the "docker compose ..." command, such as "build", "up", etc.
         **kwargs: Passed through to the context.run() call.
     """
     compose_command_tokens = [
-        "docker-compose",
+        "docker compose",
         f'--project-name "{context.nautobot.project_name}"',
         f'--project-directory "{context.nautobot.compose_dir}"',
     ]
@@ -163,7 +163,7 @@ def docker_compose(context, command, **kwargs):
     if service is not None:
         compose_command_tokens.append(service)
 
-    print(f'Running docker-compose command "{command}"')
+    print(f'Running docker compose command "{command}"')
     compose_command = " ".join(compose_command_tokens)
     env = kwargs.pop("env", {})
     env.update({"PYTHON_VER": context.nautobot.python_ver})


Test patch: