Move lab4 to lab5

This commit is contained in:
2026-11-16 19:54:38 +03:00
parent 276dbdad8a
commit cd84a6fd36
208 changed files with 9611 additions and 25 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# Creates local secrets for the Compose stack. Never overwrites an existing secret:
# the PostgreSQL volume is initialised with the first password and keeps it.
set -eu
cd "$(dirname "$0")/.."
mkdir -p secrets
# Readable by the non-root users inside the containers (bind-mounted as is).
umask 022
for name in db_password redis_password s3_access_key_id s3_secret_access_key s3_api_access_key_id s3_api_secret_access_key; do
if [ ! -s "secrets/$name" ]; then
openssl rand -hex 24 > "secrets/$name"
echo "created secrets/$name"
else
echo "secrets/$name already exists, keeping it"
fi
done