19 lines
361 B
Python
19 lines
361 B
Python
import fastapi
|
|
|
|
from spud.container_managers import PodmanManager, ServiceMetadata
|
|
|
|
app = fastapi.FastAPI()
|
|
|
|
manager = PodmanManager()
|
|
|
|
|
|
@app.get("/")
|
|
def alive():
|
|
"""Live check."""
|
|
return 200
|
|
|
|
|
|
@app.get("/status")
|
|
def check_service_statuses() -> list[ServiceMetadata]:
|
|
"""Reports on the status of all services."""
|
|
return manager.get_services()
|