forked from mtusi2026/mtusi2026lab3
Разбить API на модули и перевести комментарии на русский
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Creates local synthetic credentials and .env once. Never overwrites: the pgdata volume keeps the old password.
|
||||
# Один раз создаёт локальные учебные секреты и .env. Не перезаписывает: в volume pgdata остаётся старый пароль.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
[ -f .env ] || cp .env.example .env
|
||||
@@ -12,5 +12,5 @@ chmod 700 secrets
|
||||
password=$(openssl rand -hex 24)
|
||||
printf '%s' "$password" > secrets/postgres_password
|
||||
printf 'postgres://messenger:%s@postgres:5432/messenger' "$password" > secrets/database_url
|
||||
chmod 644 secrets/postgres_password secrets/database_url # read by container users; the directory stays 700
|
||||
chmod 644 secrets/postgres_password secrets/database_url # читают пользователи контейнеров; сам каталог остаётся 700
|
||||
echo "created secrets/ and .env"
|
||||
|
||||
Reference in New Issue
Block a user