You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB
Python

2 years ago
"""
A set of `invoke` helper commands used for this project.
"""
from invoke import task
@task
def start_app(c, docs=False, extra=''):
"""Starts the app."""
print("Start the app")
if docs:
print(f"Building docs. Docs value: {extra}")
@task
def non_sense(c):
"""A non-sense command."""
print("This is non-sense")
2 years ago
@task
def start_rabbit(c):
"""Runs the RabbitMQ integration environment."""
print("Starting RabbitMQ")
start_app(c)
2 years ago
c.run("docker compose -f docker-compose-rabbit.yml up -d")
@task
def stop_rabbit(c):
"""Stops the RabbitMQ integration environent."""
print("Stopping RabbitMQ")
c.run("docker compose -f docker-compose-rabbit.yml down")
@task
def start_redis(c):
"""Runs the Redis integration environment."""
print("Starting Redis")
c.run("docker compose -f docker-compose-redis.yml up -d")
@task
def stop_redis(c):
"""Stops the Redis integration environent."""
print("Stopping Redis")
c.run("docker compose -f docker-compose-redis.yml down")
# TODO add docker build, tag, and push command for app