Лабораторная 4

This commit is contained in:
2026-11-22 17:26:57 +03:00
parent ec540a1a72
commit 18b44606dd
24 changed files with 1232 additions and 22 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
import os
import subprocess
from pathlib import Path
root = Path(__file__).resolve().parents[1]
target = os.environ["TARGET_INSTANCE_ID"]
service = {"api-1": "api1", "api-2": "api2"}[target]
subprocess.run(
["docker", "compose", "--env-file", ".env", "stop", service],
cwd=root,
check=True,
)