generated from oci/template
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 2m53s
83 lines
2.3 KiB
Bash
Executable file
83 lines
2.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# TAK Server Setup Validation Script
|
|
|
|
echo "TAK Server Hybrid Container - Setup Validation"
|
|
echo "=============================================="
|
|
|
|
# Check if takserver-release directory exists
|
|
if [ ! -d "takserver-release" ]; then
|
|
echo "❌ takserver-release directory not found"
|
|
echo " Please create the directory: mkdir -p takserver-release"
|
|
exit 1
|
|
fi
|
|
|
|
# Check for TAK server files
|
|
TAK_FILES=$(find takserver-release -name "takserver-docker-*.zip" 2>/dev/null)
|
|
|
|
if [ -z "$TAK_FILES" ]; then
|
|
echo "❌ No TAK server files found in takserver-release/"
|
|
echo ""
|
|
echo "Required:"
|
|
echo " - File format: takserver-docker-X.Y-RELEASE-Z.zip"
|
|
echo " - Example: takserver-docker-5.4-RELEASE-19.zip"
|
|
echo ""
|
|
echo "Please:"
|
|
echo " 1. Obtain TAK server files through proper channels"
|
|
echo " 2. Ensure you have valid licensing/authorization"
|
|
echo " 3. Place files in takserver-release/ directory"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ TAK server files found:"
|
|
for file in $TAK_FILES; do
|
|
echo " - $(basename $file)"
|
|
done
|
|
|
|
# Find latest version
|
|
LATEST_ZIP=$(echo "$TAK_FILES" | \
|
|
sed -n 's/.*takserver-docker-\([0-9]\+\.[0-9]\+\)-RELEASE-\([0-9]\+\)\.zip/\1.\2 &/p' | \
|
|
sort -V | tail -1 | cut -d' ' -f2-)
|
|
|
|
if [ -n "$LATEST_ZIP" ]; then
|
|
echo "✅ Latest version detected: $(basename $LATEST_ZIP)"
|
|
fi
|
|
|
|
# Check Docker
|
|
if ! command -v docker &> /dev/null; then
|
|
echo "❌ Docker not found - please install Docker"
|
|
exit 1
|
|
fi
|
|
echo "✅ Docker found"
|
|
|
|
# Check Docker Compose
|
|
if ! command -v docker-compose &> /dev/null; then
|
|
echo "❌ Docker Compose not found - please install Docker Compose"
|
|
exit 1
|
|
fi
|
|
echo "✅ Docker Compose found"
|
|
|
|
# Check if Dockerfile exists
|
|
if [ ! -f "Dockerfile" ]; then
|
|
echo "❌ Dockerfile not found"
|
|
exit 1
|
|
fi
|
|
echo "✅ Dockerfile found"
|
|
|
|
# Check if docker-compose.yml exists
|
|
if [ ! -f "docker-compose.yml" ]; then
|
|
echo "❌ docker-compose.yml not found"
|
|
exit 1
|
|
fi
|
|
echo "✅ Docker Compose configuration found"
|
|
|
|
echo ""
|
|
echo "🎉 All checks passed! You're ready to build and run the container."
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Build: ./build.sh"
|
|
echo " 2. Start: docker-compose up -d"
|
|
echo " 3. Logs: docker-compose logs -f tak-hybrid"
|
|
echo ""
|
|
echo "⚠️ Remember: Ensure you have proper licensing for TAK server software"
|