diff --git a/README.md b/README.md index 0dea164..51f8f7e 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,16 @@ ``` **Access Points:** -- 🌐 **WHOOSH Dashboard**: http://localhost:3001 -- 📡 **API Documentation**: http://localhost:8087/docs +- 🌐 **Marketing Website**: https://www.chorus.services (production) +- 🎛️ **Dashboard**: https://dashboard.chorus.services (production) +- 📡 **API**: https://api.chorus.services (production) - 📊 **Grafana Monitoring**: http://localhost:3002 (admin/chorusadmin) - 🔍 **Prometheus Metrics**: http://localhost:9092 +**Local Development:** +- Dashboard: http://localhost:3001 +- API Docs: http://localhost:8087/docs + ## 🏗️ Architecture Overview CHORUS Services integrates five core components into a unified platform: diff --git a/WEBSITE_INTEGRATION.md b/WEBSITE_INTEGRATION.md new file mode 100644 index 0000000..e674fdb --- /dev/null +++ b/WEBSITE_INTEGRATION.md @@ -0,0 +1,52 @@ +# Website Integration - Ready for Submodule Addition + +## Status: Prepared ✅ + +The CHORUS Services platform is fully configured for the www.chorus.services website integration. All configuration is ready for when the website project is created. + +## Configuration Complete + +### Docker Swarm Configuration +- `docker-compose.swarm.yml` includes `chorus-website` service +- Traefik labels configured for `www.chorus.services` and `chorus.services` +- Domain redirect: `chorus.services` → `www.chorus.services` +- SSL/TLS certificates via Let's Encrypt +- Registry image: `registry.home.deepblack.cloud/tony/chorus-website:latest` + +### Build Scripts +- `build-and-push.sh` includes website build support +- Individual build command: `./build-and-push.sh website` +- Integrated with unified build: `./chorus.sh build` + +### Management Integration +- `./chorus.sh deploy` includes website in production deployment +- Production endpoints configured and documented + +## Next Steps (When Website Project is Ready) + +1. **Add Git Submodule:** + ```bash + git submodule add modules/website + ``` + +2. **Build and Deploy:** + ```bash + ./chorus.sh build # Includes website + ./chorus.sh deploy # Deploys to production + ``` + +3. **Access Points:** + - **Marketing**: https://www.chorus.services + - **Dashboard**: https://dashboard.chorus.services + - **API**: https://api.chorus.services + +## Domain Configuration ✅ + +External domains configured with DNS pointing to 202.171.184.242: +- `chorus.services` (redirects to www) +- `www.chorus.services` (marketing website) +- `dashboard.chorus.services` (WHOOSH dashboard) +- `api.chorus.services` (API endpoints) +- `*.chorus.services` (wildcard for future services) + +All Traefik labels and routing ready for production deployment. \ No newline at end of file diff --git a/build-and-push.sh b/build-and-push.sh index 1aa0222..ec786dc 100755 --- a/build-and-push.sh +++ b/build-and-push.sh @@ -109,6 +109,13 @@ main() { print_warning "SLURP RL Tuner dockerfile not found - skipping" fi + # Marketing Website + if [ -d "modules/website" ]; then + build_and_push "website" "modules/website" + else + print_warning "Website directory not found - skipping" + fi + print_success "All CHORUS Services images built and pushed successfully!" # List pushed images @@ -118,6 +125,7 @@ main() { echo " - $REGISTRY/tony/chorus-bzzz-coordinator:$TAG" echo " - $REGISTRY/tony/chorus-slurp-api:$TAG" echo " - $REGISTRY/tony/chorus-slurp-rl-tuner:$TAG" + echo " - $REGISTRY/tony/chorus-website:$TAG" } # Handle command line arguments @@ -145,6 +153,10 @@ case "${1:-}" in docker_login build_and_push "slurp-rl-tuner" "modules/slurp" "Dockerfile.rl-tuner" ;; + "website") + docker_login + build_and_push "website" "modules/website" + ;; "help"|"-h"|"--help") echo "CHORUS Services Build and Push Script" echo "" @@ -158,6 +170,7 @@ case "${1:-}" in echo " bzzz Build and push BZZZ coordinator only" echo " slurp-api Build and push SLURP API only" echo " slurp-rl-tuner Build and push SLURP RL Tuner only" + echo " website Build and push marketing website only" echo " help Show this help message" ;; *) diff --git a/chorus.sh b/chorus.sh index b051a96..a570a8b 100755 --- a/chorus.sh +++ b/chorus.sh @@ -154,8 +154,12 @@ deploy_swarm() { print_success "CHORUS Services deployed to swarm" print_info "Production access points:" - echo " - WHOOSH Dashboard: https://chorus.home.deepblack.cloud" - echo " - WHOOSH API: https://chorus-api.home.deepblack.cloud" + echo " - Marketing Website: https://www.chorus.services" + echo " - Dashboard: https://dashboard.chorus.services" + echo " - API: https://api.chorus.services" + echo " - Documentation: https://api.chorus.services/docs" + echo "" + print_info "Internal services (*.home.deepblack.cloud):" echo " - BZZZ Coordinator: https://chorus-bzzz.home.deepblack.cloud" echo " - SLURP API: https://chorus-slurp.home.deepblack.cloud" echo " - COOEE RL Tuner: https://chorus-cooee.home.deepblack.cloud" diff --git a/docker-compose.swarm.yml b/docker-compose.swarm.yml index 3f3cf64..aba2915 100644 --- a/docker-compose.swarm.yml +++ b/docker-compose.swarm.yml @@ -20,7 +20,7 @@ services: labels: - "traefik.enable=true" - "traefik.docker.network=tengig" - - "traefik.http.routers.chorus-api.rule=Host(`chorus-api.home.deepblack.cloud`)" + - "traefik.http.routers.chorus-api.rule=Host(`api.chorus.services`)" - "traefik.http.routers.chorus-api.entrypoints=web-secured" - "traefik.http.routers.chorus-api.tls.certresolver=letsencryptresolver" - "traefik.http.services.chorus-api.loadbalancer.server.port=8000" @@ -28,7 +28,7 @@ services: environment: - DATABASE_URL=postgresql://chorus:choruspass@postgres:5432/chorus_whoosh - REDIS_URL=redis://redis:6379 - - CORS_ORIGINS=https://chorus.home.deepblack.cloud + - CORS_ORIGINS=https://dashboard.chorus.services,https://www.chorus.services - ENVIRONMENT=production - LOG_LEVEL=info networks: @@ -53,20 +53,48 @@ services: labels: - "traefik.enable=true" - "traefik.docker.network=tengig" - - "traefik.http.routers.chorus.rule=Host(`chorus.home.deepblack.cloud`)" - - "traefik.http.routers.chorus.entrypoints=web-secured" - - "traefik.http.routers.chorus.tls.certresolver=letsencryptresolver" - - "traefik.http.services.chorus.loadbalancer.server.port=3000" - - "traefik.http.services.chorus.loadbalancer.passhostheader=true" + - "traefik.http.routers.chorus-dashboard.rule=Host(`dashboard.chorus.services`)" + - "traefik.http.routers.chorus-dashboard.entrypoints=web-secured" + - "traefik.http.routers.chorus-dashboard.tls.certresolver=letsencryptresolver" + - "traefik.http.services.chorus-dashboard.loadbalancer.server.port=3000" + - "traefik.http.services.chorus-dashboard.loadbalancer.passhostheader=true" environment: - - REACT_APP_API_URL=https://chorus-api.home.deepblack.cloud - - REACT_APP_WS_URL=wss://chorus-api.home.deepblack.cloud + - REACT_APP_API_URL=https://api.chorus.services + - REACT_APP_WS_URL=wss://api.chorus.services networks: - tengig - chorus_network depends_on: - whoosh-backend + # Marketing Website + chorus-website: + image: registry.home.deepblack.cloud/tony/chorus-website:latest + deploy: + replicas: 2 + placement: + constraints: + - node.role == worker + resources: + limits: + memory: 128M + reservations: + memory: 64M + labels: + - "traefik.enable=true" + - "traefik.docker.network=tengig" + - "traefik.http.routers.chorus-website.rule=Host(`www.chorus.services`) || Host(`chorus.services`)" + - "traefik.http.routers.chorus-website.entrypoints=web-secured" + - "traefik.http.routers.chorus-website.tls.certresolver=letsencryptresolver" + - "traefik.http.services.chorus-website.loadbalancer.server.port=80" + - "traefik.http.services.chorus-website.loadbalancer.passhostheader=true" + # Redirect naked domain to www + - "traefik.http.middlewares.chorus-redirect.redirectregex.regex=^https://chorus.services/(.*)" + - "traefik.http.middlewares.chorus-redirect.redirectregex.replacement=https://www.chorus.services/$${1}" + - "traefik.http.routers.chorus-website.middlewares=chorus-redirect" + networks: + - tengig + # BZZZ - P2P Agent Coordination bzzz-coordinator: image: registry.home.deepblack.cloud/tony/chorus-bzzz-coordinator:latest