Configurable docker-compose path
This commit is contained in:
parent
526f78f44d
commit
66c3422141
|
@ -3,6 +3,8 @@ from typing import List
|
|||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
import click
|
||||
|
||||
|
||||
def find_services(root: Path) -> List[str]:
|
||||
return [_.split("/")[0] for _ in glob.glob("*/docker-compose.y*ml", root_dir=root)]
|
||||
|
@ -17,5 +19,7 @@ def get_compose_file(service_path: Path) -> Path:
|
|||
|
||||
|
||||
def docker_compose_command(commands: List[str], compose_file: Path):
|
||||
cmd = ["docker-compose", "-f", compose_file] + list(commands)
|
||||
ctx = click.get_current_context()
|
||||
config = ctx.obj["CONFIG"]
|
||||
cmd = [config.compose_executable, "-f", compose_file] + list(commands)
|
||||
subprocess.run(cmd)
|
||||
|
|
Loading…
Reference in New Issue