skeleton lab7 and tasks for grade 3
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-21 16:21:47 +03:00
parent 20afc2c790
commit 0b97f77d76
185 changed files with 15590 additions and 154 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
for role in api worker publisher cleanup; do
# psql читает пароль из файла. SQL и значения остаются внутри контейнера.
ROLE="$role" psql --no-psqlrc --quiet --set=ON_ERROR_STOP=1 \
--username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<'SQL'
\getenv role ROLE
SELECT format('CREATE ROLE %I LOGIN PASSWORD %L', :'role',
trim(pg_read_file('/run/roles/' || :'role'))) \gexec
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
SQL
done
+3
View File
@@ -0,0 +1,3 @@
local all all trust
hostssl all all all scram-sha-256
hostnossl all all all reject
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
set -eu
install -d -m 0700 -o postgres -g postgres /run/postgres-tls
install -m 0600 -o postgres -g postgres /run/tls/server.key /run/postgres-tls/server.key
exec /usr/local/bin/docker-entrypoint.sh postgres \
-c ssl=on -c ssl_min_protocol_version=TLSv1.2 \
-c ssl_cert_file=/run/tls/server.crt -c ssl_key_file=/run/postgres-tls/server.key \
-c hba_file=/etc/postgres/pg_hba.conf