-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.py
59 lines (47 loc) · 1.11 KB
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from invoke import task
@task
def tests(c):
"""
Run ruff and black to autoformat the codebase.
"""
print("Running Ruff...")
c.run("ruff check . --fix")
print("Running Black...")
c.run("black .")
@task
def up(c):
"""
Start the Docker Compose services.
"""
print("Starting Docker Compose services...")
c.run("docker compose up")
@task
def build(c):
"""
Build the Docker Compose services.
"""
print("Building Docker Compose services...")
c.run("docker compose up --build")
@task
def stop(c):
"""
Stop the Docker Compose services.
"""
print("Stopping Docker Compose services...")
c.run("docker compose down")
@task
def destroy(c):
"""
Destroy all Docker volumes, including orphans.
"""
print("Destroying all Docker volumes, including orphans...")
c.run("docker compose down -v --remove-orphans")
print("Removing unused volumes...")
c.run("docker volume prune -f")
@task
def serve_docs(c):
"""
Start the MKDocs.
"""
print("Starting Local MKDocs...")
c.run("mkdocs serve -f mkdocs/mkdocs.yml")