Files
aitest-reasonml-mon-fbk/docker-entrypoint.sh
Charles N Wyble e1ff581603 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
2026-01-13 15:56:42 -05:00

20 lines
542 B
Bash
Executable File

#!/bin/sh
set -e
# Wait for database to be ready
echo "Waiting for database to be ready..."
until PGPASSWORD="${DB_PASSWORD:-changeme}" psql -h "$DB_HOST" -U "$DB_USER" -d "${DB_NAME:-website_monitor}" -c '\q'; do
echo "Database is unavailable - sleeping"
sleep 2
done
echo "Database is ready!"
# Run database initialization if needed
echo "Initializing database..."
/app/website_monitor_init_db || echo "Database init skipped or already done"
# Start the main application
echo "Starting website monitor..."
exec /app/website_monitor