<filename>templates/app/app_docker/actions.py
from JumpScale import j


def install(job):
    '''
    make sure docker is properly installed (use cuisine functionality)
    '''
    service = job.service
    cuisine = service.executor.cuisine
    if not cuisine.systemservices.docker.isInstalled():
        cuisine.systemservices.docker.install()

    if not cuisine.systemservices.dockercompose.isInstalled():
        cuisine.systemservices.dockercompose.install()


def start(job):
    pass


def stop(job):
    '''
    @todo stop all docker instances
    '''
    pass


def monitor(job):
    '''
    @todo monitor that docker is properly working
    '''
    pass
