module Squarectl::Commands::Compose

Overview

Builds and runs docker compose (or docker-compose on v1) commands. Mixed into Task; used directly by the compose target and reused by the kube target to render the merged compose config before conversion.

Direct including types

Defined in:

squarectl/commands/compose.cr

Constant Summary

PRE_ARGS_BOOL = ["--all-resources", "--compatibility", "--dry-run"]

docker-compose global flags that must appear before the action verb. PRE_ARGS_BOOL take no value; PRE_ARGS_FLAGS take a following value (or --flag=value). Everything else is treated as a post-action argument.

PRE_ARGS_FLAGS = ["--ansi", "--env-file", "--parallel", "--profile", "--progress", "--project-directory"]

docker-compose global flags that must appear before the action verb. PRE_ARGS_BOOL take no value; PRE_ARGS_FLAGS take a following value (or --flag=value). Everything else is treated as a post-action argument.

Instance Method Summary

Instance Method Detail

def build_docker_compose_command(action, args) #

Assembles the full argv: --project-name --file ... On v2 the command is docker with a compose prefix arg; on v1 it is docker-compose with no prefix (dropped via compact).


[View source]
def capture_docker_compose(action, args) #

[View source]
def exec_docker_compose(action, args) : NoReturn #

[View source]
def extract_docker_args(args) #

Splits user-supplied args into those that belong before the action verb (matched against PRE_ARGS_BOOL/PRE_ARGS_FLAGS, consuming a value for the latter) and everything else, which goes after.


[View source]
def run_docker_compose(action, args) #

[View source]