Esempio n. 1
0
def tail(ctx, service=None):
    """ Run Docker compose logs with the -f follow or tail option. """
    get_compose_environment()
    if service:
        ctx.run(
            DOCKER_COMPOSE_SERVICE_LOGS_CMD.format(
                command=DOCKER_COMPOSE_LOGS_TAIL_CMD, service=service))
        return
    ctx.run(DOCKER_COMPOSE_LOGS_TAIL_CMD)
Esempio n. 2
0
def logs(ctx, service):
    """ Run Docker compose logs with optional service name. """
    get_compose_environment()
    if service:
        ctx.run(
            DOCKER_COMPOSE_SERVICE_LOGS_CMD.format(
                command=DOCKER_COMPOSE_LOGS_CMD, service=service))
        return
    ctx.run(DOCKER_COMPOSE_LOGS_CMD)
Esempio n. 3
0
def raw(ctx):
    """ Run Docker compose up which brings up the compose stack.
    RISKY AS NO BUILD FIRST SO USE AT RISK"""
    get_compose_environment()
    ctx.run(DOCKER_COMPOSE_UP_CMD)
Esempio n. 4
0
def down(ctx):
    """ Run Docker compose down to bring down the compose stack. """
    get_compose_environment()
    ctx.run(DOCKER_COMPOSE_DOWN_CMD)
Esempio n. 5
0
def up(ctx):  # pylint: disable=invalid-name
    """ Run Docker compose up which brings up the compose stack. """
    get_compose_environment()
    ctx.run(DOCKER_COMPOSE_UP_CMD)