перенос основы проекта из 1 лабы

This commit is contained in:
Ванек
2026-10-22 13:44:26 +03:00
parent 65003b6119
commit 9961362555
24 changed files with 978 additions and 20 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail
project_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
container="${CONTAINER_NAME:-mtusi-messenger-lab2}"
port="${HOST_PORT:-8080}"
if [[ ! -f "$project_dir/.env" ]]; then
cp "$project_dir/.env.example" "$project_dir/.env"
fi
docker run --detach --name "$container" --label mtusi.lab=2 \
--cpus 1 --memory 256m \
--publish "127.0.0.1:$port:8080" \
--env-file "$project_dir/.env" \
"${IMAGE_NAME:-mtusi-messenger:lab2}"
"$project_dir/scripts/wait-ready.sh" "$container"
echo "API: http://localhost:$port"