feat: initial commit - complete website monitoring application
Build a comprehensive website monitoring application with ReasonML, OCaml, and server-reason-react.
Features:
- Real-time website monitoring with HTTP status checks
- Email and webhook alerting system
- Beautiful admin dashboard with Tailwind CSS
- Complete REST API for CRUD operations
- Background monitoring scheduler
- Multi-container Docker setup with 1-core CPU constraint
- PostgreSQL database with Caqti
- Full documentation and setup guides
Tech Stack:
- OCaml 5.0+ with ReasonML
- Dream web framework
- server-reason-react for UI
- PostgreSQL 16 database
- Docker & Docker Compose
Files:
- 9 OCaml source files (1961 LOC)
- 6 documentation files (1603 LOC)
- Complete Docker configuration
- Comprehensive API documentation
💘 Generated with Crush
This commit is contained in:
99
scripts/verify-setup.sh
Executable file
99
scripts/verify-setup.sh
Executable file
@@ -0,0 +1,99 @@
|
||||
#!/bin/bash
|
||||
# Setup verification script for Website Monitor
|
||||
|
||||
set -e
|
||||
|
||||
echo "========================================="
|
||||
echo "Website Monitor Setup Verification"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
|
||||
# Check Docker
|
||||
echo "Checking Docker installation..."
|
||||
if command -v docker &> /dev/null; then
|
||||
echo "✓ Docker is installed: $(docker --version)"
|
||||
else
|
||||
echo "✗ Docker is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check Docker Compose
|
||||
echo ""
|
||||
echo "Checking Docker Compose installation..."
|
||||
if command -v docker-compose &> /dev/null; then
|
||||
echo "✓ Docker Compose is installed: $(docker-compose --version)"
|
||||
else
|
||||
echo "✗ Docker Compose is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check project files
|
||||
echo ""
|
||||
echo "Checking project structure..."
|
||||
files=(
|
||||
"Dockerfile"
|
||||
"docker-compose.yml"
|
||||
"dune-project"
|
||||
"website_monitor.opam"
|
||||
"bin/main.ml"
|
||||
"lib/database.ml"
|
||||
"lib/monitor.ml"
|
||||
"lib/alert.ml"
|
||||
"lib/api.ml"
|
||||
"lib/ui.ml"
|
||||
"lib/scheduler.ml"
|
||||
)
|
||||
|
||||
missing_files=()
|
||||
for file in "${files[@]}"; do
|
||||
if [ -f "$file" ]; then
|
||||
echo " ✓ $file"
|
||||
else
|
||||
echo " ✗ $file (missing)"
|
||||
missing_files+=("$file")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#missing_files[@]} -gt 0 ]; then
|
||||
echo ""
|
||||
echo "✗ Missing ${#missing_files[@]} required file(s)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check .env file
|
||||
echo ""
|
||||
echo "Checking environment configuration..."
|
||||
if [ -f .env ]; then
|
||||
echo "✓ .env file exists"
|
||||
else
|
||||
echo "⚠ .env file not found. Creating from example..."
|
||||
cp .env.example .env
|
||||
echo "✓ Created .env file from .env.example"
|
||||
echo " Please edit .env with your configuration before running."
|
||||
fi
|
||||
|
||||
# Check Docker build cache availability
|
||||
echo ""
|
||||
echo "Checking Docker build environment..."
|
||||
if docker info &> /dev/null; then
|
||||
echo "✓ Docker daemon is running"
|
||||
else
|
||||
echo "✗ Docker daemon is not running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Final summary
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "Verification Summary"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
echo "✓ All checks passed!"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Edit .env file with your configuration"
|
||||
echo "2. Run: docker-compose up -d"
|
||||
echo "3. Access dashboard at: http://localhost:8080"
|
||||
echo ""
|
||||
echo "For more information, see README.md"
|
||||
echo "========================================="
|
||||
Reference in New Issue
Block a user