#!/bin/bash # Discord Fishbowl - Complete Docker Stack Startup (Fixed) set -e # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color echo -e "${GREEN}🐠 Discord Fishbowl - Starting Fixed Stack${NC}" echo "" # Check if Docker is running if ! docker info >/dev/null 2>&1; then echo -e "${RED}❌ Docker is not running. Please start Docker first.${NC}" exit 1 fi # Check if .env.docker exists if [ ! -f .env.docker ]; then echo -e "${YELLOW}⚠️ .env.docker not found. Using default environment.${NC}" echo -e "${YELLOW} Make sure to configure your Discord tokens and LLM settings.${NC}" fi echo "Building and starting services..." echo "" # Set profiles for optional services only PROFILES="" if [ -f .env.docker ]; then # Check if ChromaDB is specifically requested instead of Qdrant if grep -q "VECTOR_DB_TYPE=chromadb" .env.docker; then PROFILES="$PROFILES --profile chromadb" echo "Using ChromaDB for vector storage" else echo "Using Qdrant for vector storage (default)" fi fi # Start the stack (core services: postgres, redis, qdrant, fishbowl, fishbowl-admin are default) echo "Starting core services: PostgreSQL, Redis, Qdrant, Fishbowl App, Admin Interface" docker compose --env-file .env.docker $PROFILES up -d --build echo "" echo -e "${GREEN}✅ Discord Fishbowl stack started successfully!${NC}" echo "" echo "Services available at:" echo " 🤖 Discord Fishbowl App: Running in container" # Get admin port from environment ADMIN_PORT=${ADMIN_PORT:-8294} if [ -f .env.docker ]; then # Try to get admin port from .env.docker if grep -q "ADMIN_PORT=" .env.docker; then ADMIN_PORT=$(grep "ADMIN_PORT=" .env.docker | cut -d'=' -f2) fi fi # Get server IP for external access SERVER_IP=$(ip route get 1.1.1.1 | grep -oP 'src \K\S+' | head -1 2>/dev/null || echo "localhost") echo " 🌐 Admin Interface:" echo " Local: http://localhost:$ADMIN_PORT" echo " Network: http://$SERVER_IP:$ADMIN_PORT" echo " Credentials: admin / FIre!@34" echo " 📊 PostgreSQL: localhost:15432" echo " 🔴 Redis: localhost:6379" echo " 🔍 Qdrant: http://localhost:6333" echo " Dashboard: http://localhost:6333/dashboard" echo "" echo "To view logs:" echo " docker compose logs -f fishbowl # Main application" echo " docker compose logs -f fishbowl-admin # Admin interface" echo " docker compose logs -f # All services" echo "" echo "To stop:" echo " docker compose down" echo "" echo -e "${YELLOW}📝 Note: All core services now start by default!${NC}" echo -e "${GREEN}🎉 Fixed network configuration - services can now communicate properly${NC}"