A monitoring service that pings configured endpoints and tracks their status over time.
- Monitor multiple endpoints with configurable intervals
- Track response times and status codes
- Automatic incident detection and notification
- SQLite database for persistence
- Web dashboard for viewing monitor status and history
- API for accessing monitoring data
- Runtime: Bun - Fast all-in-one JavaScript runtime
- Process Manager: PM2 - Production process manager with load balancing
- Database: SQLite (via bun:sqlite)
- ORM: Drizzle ORM
- API: Hono + oRPC
- Frontend: React + TanStack Query + TanStack Router
This branch (standalone) provides a single-container deployment that runs both the web app and pinger service.
- Docker and Docker Compose
- Bun (for local development)
The pinger service uses Effect's internal cron scheduler, so MONITOR_INTERVAL_MINUTES is required in both local development and Docker/production environments.
Create a .env file in the root directory for local development:
# Monitor configuration
MONITOR_INTERVAL_MINUTES=1 # Interval in minutes between ping cycles (1-120)
MONITOR_CONCURRENCY=5 # Number of monitors to ping concurrently (1-10)
PORT=3000 # API server port (default: 3000)
DATABASE_PATH=../../ping-status.db # Path to SQLite database file
# Optional: Slack notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URLNote: In Docker, MONITOR_INTERVAL_MINUTES defaults to 1 minute (set in docker-compose.yml). The pinger runs as a long-running process that schedules itself internally using Effect's cron scheduler.
Build and run the standalone container:
docker-compose up --build standaloneThe service will be available at http://localhost:8080
The container automatically:
- Runs database migrations on startup
- Manages both API and pinger services with PM2
- Restarts services automatically on crashes
- Maintains logs in
/app/logs/directory
View PM2 process status:
docker exec -it <container-name> pm2 statusView logs:
docker exec -it <container-name> pm2 logsView specific service logs:
docker exec -it <container-name> pm2 logs app
docker exec -it <container-name> pm2 logs pingerThe pinger uses Effect's internal cron scheduler. To modify the ping interval, set the MONITOR_INTERVAL_MINUTES environment variable:
- In
docker-compose.ymlfor Docker deployments - In your
.envfile for local development
The pinger runs as a long-running process that schedules itself internally. Supported values: 1-120 minutes.
Install dependencies:
bun installGenerate database migrations (after schema changes):
bun run db:generateRun database migrations:
bun run db:migrateNote: In Docker, migrations run automatically on container startup.
Run the pinger service (in one terminal):
bun run pingerRun the API server (in another terminal):
bun run apiRun the web development server (in another terminal):
bun run webThe application uses SQLite for data persistence. The database file location depends on the environment:
- Local Development:
ping-status.dbin the project root (or path specified byDATABASE_PATH) - Docker:
/app/data/ping-status.db(mounted from./datadirectory)
To view/edit the database directly:
bun run db:studioapps/api- API server (Hono + oRPC)apps/web- Web frontend (React)apps/pinger- Monitoring servicepackages/db- Database schema and clientpackages/config- Environment variable validation and monitor configurationpackages/monitor- Monitor configuration typesinfra/- Docker configuration