Files
2025-12-26 13:38:04 +01:00

79 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Development Mode Startup Script
# Starts backend services in containers and frontend dev server
set -e
echo "==================================="
echo "Copper Tone Technologies - Dev Mode"
echo "==================================="
echo ""
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if podman-compose is available
if ! command -v podman-compose &> /dev/null; then
echo "Error: podman-compose is not installed"
exit 1
fi
# Navigate to project root
cd "$(dirname "$0")"
echo -e "${YELLOW}Starting backend services...${NC}"
echo ""
# Start only backend services (not frontend - we'll use Vite dev server)
podman-compose up -d db auth-service work-management-service payment-service blog-service ipfs-service forum-service
echo ""
echo -e "${GREEN}Backend services started!${NC}"
echo ""
echo "Service Ports:"
echo " - Database (PostgreSQL): internal only"
echo " - Auth Service: http://localhost:8082"
echo " - Work Management: http://localhost:8083"
echo " - Payment Service: http://localhost:8084"
echo " - Blog Service: http://localhost:8085"
echo " - IPFS Service: http://localhost:8086"
echo " - Forum Service: http://localhost:8087"
echo ""
# Check if pnpm is available
if ! command -v pnpm &> /dev/null; then
echo "Error: pnpm is not installed"
echo "Install with: npm install -g pnpm"
exit 1
fi
echo -e "${YELLOW}Starting frontend dev server...${NC}"
echo ""
cd frontend
# Install dependencies if needed
if [ ! -d "node_modules" ]; then
echo "Installing dependencies..."
pnpm install
fi
echo ""
echo -e "${GREEN}Starting Vite dev server...${NC}"
echo ""
echo "Frontend will be available at:"
echo " - http://localhost:5173"
echo ""
echo "Vue DevTools:"
echo " - Press Alt+Shift+D in the app"
echo " - Or visit http://localhost:5173/__devtools__/"
echo ""
echo "Press Ctrl+C to stop the dev server"
echo "Run 'podman-compose down' to stop backend services"
echo ""
# Start Vite dev server (this will block)
pnpm run dev