lab3: балансировка, идемпотентность, compose-стенд, evidence и отчёт.

This commit is contained in:
Conloty
2026-11-13 13:57:48 +03:00
parent 0ab3a341aa
commit c86a65f41c
30 changed files with 2569 additions and 14 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Создаёт локальные секреты (не коммитятся). Безопасно повторять: существующие не перезаписываются.
set -eu
mkdir -p secrets
if [ ! -f secrets/pg_password ]; then
head -c 24 /dev/urandom | base64 | tr -d '/+=\n' > secrets/pg_password
fi
if [ ! -f secrets/database_url ]; then
printf 'postgresql://msg:%s@postgres:5432/msg' "$(cat secrets/pg_password)" > secrets/database_url
fi
chmod 600 secrets/*