This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
spadinastan/kong/tasks.py
Marc Cataford 75e72191bd
Infra/kong gateway (#5)
* infra: add deluge to kong-net

* infra: gateway container

* feat: kong invocations

* docs: update
2022-10-31 12:34:32 -04:00

29 lines
449 B
Python

import invoke
import pathlib
PATH = pathlib.Path(__file__).parent
@invoke.task()
def start(ctx):
with ctx.cd(PATH):
ctx.run("docker-compose up -d")
@invoke.task()
def stop(ctx):
with ctx.cd(PATH):
ctx.run("docker-compose down")
@invoke.task()
def restart(ctx):
with ctx.cd(PATH):
ctx.run("docker-compose restart")
ns = invoke.Collection("kong")
ns.add_task(start)
ns.add_task(restart)
ns.add_task(stop)