forked from mtusi2026/mtusi2026lab6
lab6
This commit is contained in:
@@ -24,7 +24,7 @@ def jobctl(*args, check=True):
|
||||
|
||||
def psql(sql):
|
||||
"""Read a scalar/list from the stand database (operator evidence only)."""
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab5')
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab6')
|
||||
result = subprocess.run(
|
||||
['docker', 'exec', project + '-postgres-1', 'psql', '-U', 'messenger', '-d', 'messenger', '-Atc', sql],
|
||||
cwd=ROOT, capture_output=True, text=True, check=True,
|
||||
@@ -35,7 +35,7 @@ def psql(sql):
|
||||
|
||||
def containers_by_hostname(service='api'):
|
||||
"""{hostname: {id, name, status}} для контейнеров сервиса."""
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab5')
|
||||
project = os.environ.get('COMPOSE_PROJECT_NAME', 'mtusi-messenger-lab6')
|
||||
listed = subprocess.run(
|
||||
[
|
||||
'docker', 'ps', '-q',
|
||||
|
||||
Reference in New Issue
Block a user