Move lab2 to lab3

This commit is contained in:
2026-10-22 20:21:52 +03:00
parent 0ab3a341aa
commit a3dbcd6ba4
135 changed files with 5897 additions and 0 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; 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