Files
dropshell-templates/squashkiwi-streaming/start.sh
Your Name 11ddc264eb
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 59s
docs: Add 42 files
2025-09-01 14:04:58 +12:00

32 lines
967 B
Bash
Executable File

#!/bin/bash
# shellcheck disable=SC1091
source "${AGENT_PATH}/common.sh"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
_check_required_env_vars "PROJECT_NAME" "LOCAL_DATA_FOLDER"
cd "${LOCAL_DATA_FOLDER}/config" || _die "Failed to change to config directory"
# Load environment variables
set -a
source "${LOCAL_DATA_FOLDER}/config/service.env"
set +a
# Start docker compose services
echo "Starting ${PROJECT_NAME} services..."
docker compose up -d || _die "Failed to start Docker Compose services"
# Wait for services to be healthy
echo "Waiting for services to be healthy..."
sleep 5
# Check service health
if docker compose ps | grep -q "healthy"; then
echo "✓ Services are healthy"
else
echo "⚠ Some services may not be healthy yet. Check with: docker compose ps"
fi
echo ""
echo "${PROJECT_NAME} started successfully!"
echo "Stream URL: http://$(hostname -I | awk '{print $1}'):${HOST_PORT}"
echo "View logs: docker compose logs -f"