Files
LMS/deploy.sh

25 lines
536 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
if ! command -v docker >/dev/null || ! docker compose version >/dev/null 2>&1;
then
echo "Ошибка: нужен Docker с compose-плагином (v2)." >&2
exit 1
fi
if [ ! -f .env ]; then
echo "Файл .env не найден — создаю из .env.example."
cp .env.example .env
fi
echo "Сборка образов..."
docker compose build
echo "Запуск микросервисов..."
docker compose up -d --remove-orphans
echo
docker compose ps