Marc Cataford
75e72191bd
* infra: add deluge to kong-net * infra: gateway container * feat: kong invocations * docs: update
29 lines
449 B
Python
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)
|