kiwi-scp/src/kiwi/subcommands/logs.py

17 lines
420 B
Python
Raw Normal View History

from ._utils import SubCommand, DockerProgram
class LogsCommand(SubCommand):
def __init__(self):
super().__init__(
'logs',
2020-08-10 09:24:39 +00:00
description="Show logs of a project"
)
def run(self):
DockerProgram('docker-compose').run(
['logs', '-tf', '--tail=10'],
cwd='hello-world.project',
env={'COMPOSE_PROJECT_NAME': 'hello-world'}
)