14 lines
365 B
Python
14 lines
365 B
Python
#!/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)
|