ЛР 2 — БВТ2302 — Макаренко — PostgreSQL и сессии

This commit is contained in:
2026-12-04 11:58:32 +03:00
parent 65003b6119
commit a7b10a1d56
17 changed files with 578 additions and 24 deletions
+2
View File
@@ -0,0 +1,2 @@
@cd /d "%~dp0.."
@docker compose restart
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose restart
+8
View File
@@ -0,0 +1,8 @@
import secrets
from pathlib import Path
target = Path(__file__).resolve().parents[1] / ".env"
if not target.exists():
with target.open("x", encoding="utf-8") as output:
for name in ("DB_PASSWORD","S3_PASSWORD"):
output.write(f"{name}={secrets.token_hex(32)}\n")