#!/usr/bin/env python3 """Cross-platform restart hook; on Windows use: ACTION_SCRIPT=scripts/restart.py""" import subprocess import sys from pathlib import Path root = Path(__file__).resolve().parents[1] result = subprocess.run( ['docker', 'compose', 'restart', 'api', 'postgres', 'redis'], cwd=root, check=False, ) raise SystemExit(result.returncode)