- Migrated from HIVE branding to WHOOSH across all components - Enhanced backend API with new services: AI models, BZZZ integration, templates, members - Added comprehensive testing suite with security, performance, and integration tests - Improved frontend with new components for project setup, AI models, and team management - Updated MCP server implementation with WHOOSH-specific tools and resources - Enhanced deployment configurations with production-ready Docker setups - Added comprehensive documentation and setup guides - Implemented age encryption service and UCXL integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
3.4 KiB
3.4 KiB
Local Development Setup
Overview
This guide explains how to set up WHOOSH for local development when you don't have access to the production domain whoosh.home.deepblack.cloud.
Custom DNS Setup
Option 1: Edit /etc/hosts (Recommended)
Add the following entries to your /etc/hosts file:
127.0.0.1 whoosh.home.deepblack.cloud
127.0.0.1 whoosh-api.home.deepblack.cloud
127.0.0.1 whoosh-grafana.home.deepblack.cloud
127.0.0.1 whoosh-prometheus.home.deepblack.cloud
Option 2: Use Local Domain
Alternatively, you can modify docker-compose.swarm.yml to use a local domain:
- Replace all instances of
whoosh.home.deepblack.cloudwithwhoosh.localhost - Update the CORS_ORIGINS environment variable:
export CORS_ORIGINS=https://whoosh.localhost
Port Access
When running locally, you can also access services directly via ports:
- Frontend: http://localhost:3001
- Backend API: http://localhost:8087
- Grafana: http://localhost:3002
- Prometheus: http://localhost:9091
- PostgreSQL: localhost:5433
- Redis: localhost:6380
CORS Configuration
For local development, you may need to adjust CORS settings:
# For development with localhost
export CORS_ORIGINS="http://localhost:3000,http://localhost:3001,https://whoosh.localhost"
# Then deploy
docker stack deploy -c docker-compose.swarm.yml whoosh
SSL Certificates
Development Mode (HTTP)
For local development, you can disable HTTPS by:
- Removing the TLS configuration from Traefik labels
- Using
webinstead ofweb-securedentrypoints - Setting up a local Traefik instance without Let's Encrypt
Self-Signed Certificates
For testing HTTPS locally:
- Generate self-signed certificates for your local domain
- Configure Traefik to use the local certificates
- Add the certificates to your browser's trusted store
Environment Variables
Create a .env file with local settings:
# .env for local development
CORS_ORIGINS=http://localhost:3000,http://localhost:3001,https://whoosh.localhost
DATABASE_URL=postgresql://whoosh:whooshpass@postgres:5432/whoosh
REDIS_URL=redis://redis:6379
ENVIRONMENT=development
LOG_LEVEL=debug
Troubleshooting
DNS Not Resolving
If custom domains don't resolve:
- Check your
/etc/hostsfile syntax - Clear your DNS cache:
sudo systemctl flush-dns(Linux) orsudo dscacheutil -flushcache(macOS) - Try using IP addresses directly
CORS Errors
If you see CORS errors:
- Check the
CORS_ORIGINSenvironment variable - Ensure the frontend is accessing the correct backend URL
- Verify the backend is receiving requests from the expected origin
SSL Certificate Errors
If you see SSL certificate errors:
- Use HTTP instead of HTTPS for local development
- Add certificate exceptions in your browser
- Use a local certificate authority
Alternative: Development Docker Compose
You can create a docker-compose.dev.yml file specifically for local development:
# Simplified version without Traefik, using direct port mapping
services:
whoosh-backend:
# ... same config but without Traefik labels
ports:
- "8000:8000" # Direct port mapping
environment:
- CORS_ORIGINS=http://localhost:3000
whoosh-frontend:
# ... same config but without Traefik labels
ports:
- "3000:3000" # Direct port mapping
Then run with:
docker-compose -f docker-compose.dev.yml up -d