Move lab2 to lab3
This commit is contained in:
Executable
+19
@@ -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
|
||||
Reference in New Issue
Block a user