Перенес изменения

This commit is contained in:
Grbisba
2026-11-13 11:22:22 +03:00
parent 276dbdad8a
commit ce035c8528
122 changed files with 9357 additions and 28 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
umask 077
mkdir -p secrets/lab5
if [ ! -f .env.lab5 ]; then
{ printf 'POSTGRES_PASSWORD='; openssl rand -hex 24
printf 'REDIS_PASSWORD='; openssl rand -hex 24
printf 'HOST_PORT=18085\nAPI_REPLICAS=2\n'
} > .env.lab5
fi
if [ ! -f secrets/lab5/private_key.pem ]; then
openssl genrsa -out secrets/lab5/private_key.pem 2048 2>/dev/null
fi
if [ ! -f secrets/lab5/public_key.pem ]; then
openssl rsa -in secrets/lab5/private_key.pem -pubout -out secrets/lab5/public_key.pem 2>/dev/null
fi
# Only synthetic stand keys, readable by the non-root application inside containers.
chmod 755 secrets secrets/lab5
chmod 444 secrets/lab5/*.pem
printf '%s\n' 'Local lab5 settings and synthetic keys ready; existing files preserved.'
python3 scripts/bootstrap-storage.py